Skip to content

Normalize subtitle metadata before wanted-search storage changes#3387

Open
mjc wants to merge 13 commits into
morpheus65535:developmentfrom
mjc:mjc/wanted-search-manual-upload
Open

Normalize subtitle metadata before wanted-search storage changes#3387
mjc wants to merge 13 commits into
morpheus65535:developmentfrom
mjc:mjc/wanted-search-manual-upload

Conversation

@mjc

@mjc mjc commented Jun 11, 2026

Copy link
Copy Markdown

Summary

This PR hardens manual subtitle download/upload flows and nearby subtitle metadata handling before wanted-search state is normalized.

It focuses on user-triggered subtitle paths that read profile, audio, scene-name, processing, and notification metadata. Valid behavior is preserved, while malformed or missing metadata is handled defensively.

What changed

  • Handles missing or malformed profile payloads while building manual-search language sets.
  • Handles missing audio-language data in manual download and upload post-processing paths.
  • Preserves missing scene names as None through manual, wanted, provider, and mass-download payloads.
  • Avoids notification crashes when manual download results do not expose a message.
  • Handles missing profile keys when deciding whether to keep the original subtitle format for uploads.
  • Keeps movie and episode upload success side effects intact: save, sync, history, notifications, post-processing, and index refresh.
  • Tightens subtitle processing/refiner paths around missing language, score, and Arr-history data that can surface during manual flows.

Why this is separate

Manual download and upload are user-facing paths that can feed or refresh wanted-search state. Hardening them before the normalized wanted-state PR keeps the later schema/query diff from also carrying unrelated metadata fixes.

Tests

The added tests cover manual search and manual download with missing or malformed profile data, missing audio-language rows, missing scene names, absent notification messages, nonstandard episode display values, manual upload format decisions with incomplete profile data, and upload post-processing with partial audio-language dictionaries. The tests use real transactional movie/episode rows and mock only external side effects such as saving subtitles, sync, history, notifications, and post-processing.

mjc added 6 commits June 10, 2026 12:42
Align requests floor with vendored runtime
Add shared wanted-search fixture layer

Cover wanted-search fixtures with focused tests
(cherry picked from commit faa01ff)

test: add mass-download fixture support

test: complete mass-download fixture support

test: add shared wanted database binder

test: simplify wanted kind inference

test: register wanted fixtures at top level

test: drop unused transactional tmp fixture

test: bind profile lookup to wanted test database

test: bind profile list lookup to wanted fixtures
@mjc

mjc commented Jun 11, 2026

Copy link
Copy Markdown
Author

Stack note for review: this branch is intentionally based on the PR #3383 test harness branch in my fork, but the upstream PR targets development so maintainers can review it in the normal upstream queue. If PR #3383 lands first, this should flatten down to only the manual/upload hardening and profile/scene metadata normalization changes.

@mjc mjc changed the title Harden manual and upload subtitle flows for normalization work Normalize subtitle metadata before wanted-search storage changes Jun 11, 2026
@mjc mjc force-pushed the mjc/wanted-search-manual-upload branch from 43599c4 to d575b01 Compare June 11, 2026 23:24
@mjc mjc force-pushed the mjc/wanted-search-manual-upload branch from d575b01 to fcaec0a Compare June 12, 2026 05:49
@mjc mjc force-pushed the mjc/wanted-search-manual-upload branch from 34696bd to ab21600 Compare June 14, 2026 17:15
@mjc

mjc commented Jun 14, 2026

Copy link
Copy Markdown
Author

Force-pushed to clean up the branch history only. No content changes in the PR.

@mjc mjc force-pushed the mjc/wanted-search-manual-upload branch from b87eb16 to 543b965 Compare June 14, 2026 17:31
@mjc

mjc commented Jun 14, 2026

Copy link
Copy Markdown
Author

moved the CI fix into 3383, so all the force pushes were updating that

@mjc mjc force-pushed the mjc/wanted-search-manual-upload branch from 543b965 to fc53536 Compare June 19, 2026 17:50
@mjc mjc marked this pull request as ready for review June 19, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant