Skip to content

feat: auto-populate season/disc from title + editable fields on job details#32

Open
negativeeddy wants to merge 2 commits into
masterfrom
feat/auto-populate-season-disc
Open

feat: auto-populate season/disc from title + editable fields on job details#32
negativeeddy wants to merge 2 commits into
masterfrom
feat/auto-populate-season-disc

Conversation

@negativeeddy

Copy link
Copy Markdown
Owner

Summary

PR4 of the mkv-auto research recommendations. Auto-populates season/disc numbers from disc title normalization and adds editable fields to the job details page so users can review and correct them before episode identification runs.

Changes

  1. Auto-populate season/discTitleNormalizer runs during IdentifyService.IdentifyAsync for series/TV jobs. Extracts season and disc numbers from the disc title or label (e.g. "Season 3 Disc 2" → season=3, disc=2). Results stored as SeasonNumberAuto/DiscNumberAuto and used as defaults.

  2. New Job fieldsSeasonNumberManual, DiscNumberManual, DiscNumberAuto, StartingEpisodeNumber persisted to DB. StartingEpisodeNumber flows through to DiscContext so providers use the correct episode offset.

  3. Editable Identification card — Season, Disc, and Starting Episode rows added to the job details page with Auto/Manual/Final columns, matching the existing Title/Year/VideoType pattern.

  4. Provider context uses job valuesArmRipperService reads job.DiscNumber and job.StartingEpisodeNumber when building DiscContext, so user edits flow through to all identification providers.

Before vs After

Before After
SeasonNumber always null → defaults to 1 Auto-detected from "Season 3 Disc 2" → season=3
DiscNumber parsed ad-hoc from label Stored on job, editable, used by providers
No starting episode control User can set starting episode for multi-disc sets
Gaps in identification with wrong fallback Correct offset from user-set starting episode

Test Results

  • ArmMedia tests: 102/102 passed
  • Build: 0 errors, 0 warnings

Depends on

PR#31 (TMDB Season Catalog) — already merged.

ARM Dotnet Port added 2 commits July 26, 2026 14:24
…etails

Implements PR4 of mkv-auto research recommendations:

1. Auto-populate season/disc: TitleNormalizer runs during IdentifyService
   to extract season and disc numbers from the disc title or label.
   Results stored on Job as SeasonNumberAuto/DiscNumberAuto and used
   as defaults for SeasonNumber/DiscNumber.

2. New Job fields: SeasonNumberManual, DiscNumberManual, DiscNumberAuto,
   StartingEpisodeNumber — all persisted to DB. StartingEpisodeNumber
   is passed through to DiscContext for provider offset.

3. Editable Identification card: Season, Disc, and Starting Episode
   fields added to the job details page with Auto/Manual/Final columns.
   Manual overrides set the final value; clearing them reverts to auto.

4. ArmRipperService uses job.DiscNumber (with ParseDiscNumber fallback)
   and job.StartingEpisodeNumber when building DiscContext, so the
   values the user sets on the UI flow through to episode identification.

Build: 0 errors, 0 warnings. Tests: 102/102 ArmMedia pass (pre-existing
failures in Core/WebUi tests unrelated).
The new Job columns (SeasonNumberAuto, SeasonNumberManual, DiscNumber,
DiscNumberAuto, DiscNumberManual, StartingEpisodeNumber) were added to
the EF Core model but not to the DatabaseHelper.EnsureMigrated schema
patches, causing 'no such column' errors on existing databases.

Added TryAlterColumn calls for all 6 new columns.
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