Skip to content

feat: optionally auto-match Jellyfin series by hash - #858

Closed
RockingSisyphus wants to merge 1 commit into
AimesSoft:mainfrom
RockingSisyphus:agent/optional-jellyfin-series-auto-match
Closed

RockingSisyphus wants to merge 1 commit into
AimesSoft:mainfrom
RockingSisyphus:agent/optional-jellyfin-series-auto-match

Conversation

@RockingSisyphus

Copy link
Copy Markdown

What changed

  • adds a disabled-by-default 自动识别 Jellyfin 动画 toggle to Jellyfin mapping settings
  • discovers unmapped Jellyfin Series from the home feed and network media library
  • hashes one representative episode through the existing 16 MiB Jellyfin hash path
  • calls only DandanPlay's exact hashAndFileName match endpoint
  • persists the existing Series and representative Episode mapping records without creating watch history
  • coalesces duplicate Series requests, limits hashing to two concurrent tasks, and cools down failures for 30 minutes
  • makes nullable season-level mapping upserts idempotent and invalidates stale mapping cache entries

Why this is opt-in

Some users want Jellyfin to remain the only source of media identity. Others use NipaPlay's local-library matcher and want the same identity mapping for newly discovered Jellyfin anime. The setting therefore defaults to off and does not alter existing Jellyfin behavior until explicitly enabled.

The background path accepts only the existing exact match API result. It never silently selects the first title-search result, so ambiguous remakes and similarly named seasons remain on the existing interactive path.

Resource and behavior impact

  • mapped Series do not read media data again
  • a new unmapped Series reads the first 16 MiB of one numbered episode
  • at most two Series are hashed concurrently
  • no media files are moved or modified
  • no local watch-history entry is created

Validation

  • flutter test test/jellyfin_series_auto_match_service_test.dart
  • 39 focused Jellyfin/media-server tests passed
  • targeted analyzer: no issues in jellyfin_series_auto_match_service.dart
  • isolated integration smoke test against Jellyfin 10.11.11: 5/5 Series and representative Episode mappings created from an empty NipaPlay database; watch_history remained empty

This is opened as a draft so the maintainers can evaluate whether the discovery triggers and setting placement fit the project's preferred UX.

@Shinokawa Shinokawa closed this Sep 22, 2026
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.

2 participants