Skip to content

Conversation

@fallenbagel
Copy link
Collaborator

@fallenbagel fallenbagel commented Dec 13, 2025

Description

When a 4K request results in a lower resolution file (e.g., 1080p while waiting for a 4K release), the Jellyfin scanner previously used resolution to determine availability, incorrectly marking these files as Available. This caused non-4K users to see phantom availability for content only in the 4K library.

This PR adds ServiceAvailabilityChecker that queries Radarr/Sonarr instances to determine which tier has the file based on which instance it came from, not resolution. Falls back to resolution-based detection for manually added media. No impact on users without 4K instances configured.

How Has This Been Tested?

This has not been tested by me.

Screenshots / Logs (if applicable)

Checklist:

  • I have read and followed the contribution guidelines.
  • Disclosed any use of AI (see our policy)
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

@fallenbagel fallenbagel force-pushed the fallenbagel/fix/jellyfin-4k-detection branch from f2c0f88 to d02906d Compare December 13, 2025 07:32
@fallenbagel fallenbagel added the blocked This issue can't be solved for now label Dec 14, 2025
@github-actions github-actions bot added the merge conflict Cannot merge due to merge conflicts label Dec 29, 2025
@github-actions
Copy link

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

…tion

when 4k services are enabled, jellyfin scanner will now check which arr instance has the file
todetermine availability tier instead of relying solely on resolution detection. This should fix
theincorrecta availability status when a 4k request results in a lower resolution file. Fallbacks
tooriginal resolution based detection when media not found.

fix #1744
@fallenbagel fallenbagel force-pushed the fallenbagel/fix/jellyfin-4k-detection branch from d02906d to 09233a3 Compare December 29, 2025 15:31
@github-actions github-actions bot removed the merge conflict Cannot merge due to merge conflicts label Dec 29, 2025
@fallenbagel fallenbagel removed the blocked This issue can't be solved for now label Dec 29, 2025
@fallenbagel fallenbagel marked this pull request as ready for review December 29, 2025 15:34
@fallenbagel fallenbagel requested a review from a team as a code owner December 29, 2025 15:34
@fallenbagel fallenbagel requested a review from Copilot December 29, 2025 15:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the Jellyfin scanner where 4K requests that resulted in lower resolution files (e.g., 1080p while awaiting 4K releases) were incorrectly marked as available to all users. The fix introduces service-based availability detection by querying Radarr/Sonarr instances to determine which tier owns each file, with fallback to resolution-based detection for manually added media.

  • Adds ServiceAvailabilityChecker class to query Radarr/Sonarr instances and determine availability based on service instance rather than file resolution
  • Integrates service-based detection into Jellyfin scanner for both movies and TV shows with caching support
  • Removes outdated TODO comment explaining the exact issue this PR addresses

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 17 comments.

File Description
server/lib/scanners/serviceAvailabilityChecker.ts New module implementing service-based availability checking with caching for movies and TV shows
server/lib/scanners/jellyfin/index.ts Integrates serviceAvailabilityChecker for 4K detection, adds cache clearing on scan start, removes resolution-based detection TODO

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Handling of non-4k media on 4k instances on Library Scans

2 participants