Skip to content

feat(episodes): add episode availability tracking and sync#1671

Open
0xSysR3ll wants to merge 26 commits intoseerr-team:developfrom
0xSysR3ll:feat-episode-availability
Open

feat(episodes): add episode availability tracking and sync#1671
0xSysR3ll wants to merge 26 commits intoseerr-team:developfrom
0xSysR3ll:feat-episode-availability

Conversation

@0xSysR3ll
Copy link
Copy Markdown
Contributor

@0xSysR3ll 0xSysR3ll commented May 19, 2025

Description

This allows seerr to track the availability status of individual episodes, enabling better status reporting for partially available seasons.

How Has This Been Tested?

Screenshots / Logs (if applicable)

Settings

image

Result

image

If TVDB not set

image

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)

Summary by CodeRabbit

  • New Features

    • Toggle to enable episode availability tracking in Settings with helper text and localization
    • Episode availability badges shown on TV season/episode views when enabled
    • Public settings now expose episode availability and metadata provider options
  • Chores

    • Database and models updated to store and surface per-episode availability
    • Background sync updated to fetch, cache and persist per-episode availability
    • API responses include availability mapping for seasons
  • Migrations

    • Added migration to create episode table for availability storage

@0xSysR3ll 0xSysR3ll marked this pull request as ready for review May 19, 2025 22:14
@fallenbagel
Copy link
Copy Markdown
Collaborator

fallenbagel commented May 19, 2025

This will not work properly when theres a mismatch between tvdb and tmdb right? Thats why our original plan was to wait till tvdb pr is merged until this feature.

Unless you have some other ideas? (Haven't gone through the code yet)

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

0xSysR3ll commented May 20, 2025

This will not work properly when theres a mismatch between tvdb and tmdb right? Thats why our original plan was to wait till tvdb pr is merged until this feature.

Unless you have some other ideas? (Haven't gone through the code yet)

You’re absolutely right about the TVDB/TMDB mismatch concern - I considered that during implementation. Instead of relying on direct TMDB ID mapping, I leveraged the existing Sonarr connection via externalServiceId and match episodes based on season and episode numbers. This approach works well for the majority of shows where episode numbering aligns across databases.

That said, I recognize there will be edge cases where TVDB and TMDB have inconsistent episode structures. I saw this as a pragmatic first step that covers most use cases.

I thought about a few options moving forward:
• Merge this as-is to support the majority of shows now.
• Hold off until the TVDB PR lands to enable more precise mapping.
• Make this behavior optional until we have more robust TVDB integration.

Wdyt ?

@fallenbagel
Copy link
Copy Markdown
Collaborator

Hold off until the TVDB PR lands to enable more precise mapping.

I think this would be the better idea. Or it will cause an influx of support requests saying why is this episode not available when it is etc etc

@fallenbagel fallenbagel added the blocked This issue can't be solved for now label Aug 19, 2025
@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Sep 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 2, 2025

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

@Gauvino
Copy link
Copy Markdown
Contributor

Gauvino commented Sep 2, 2025

Can a preview be made for this PR when the merge conflicts are resolved?

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

Can a preview be made for this PR when the merge conflicts are resolved?

It still needs reviews and the merge of tvdb implementation's PR.

@Gauvino
Copy link
Copy Markdown
Contributor

Gauvino commented Sep 2, 2025

The merge of the tvdb is done

@0xSysR3ll 0xSysR3ll force-pushed the feat-episode-availability branch from 1b35dd4 to 84dc865 Compare September 3, 2025 21:14
@github-actions github-actions Bot removed the merge conflict Cannot merge due to merge conflicts label Sep 3, 2025
Comment thread server/api/servarr/sonarr.ts Fixed
@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

The merge of the tvdb is done

Now it is yes

@gauthier-th gauthier-th removed the blocked This issue can't be solved for now label Sep 4, 2025
@gauthier-th
Copy link
Copy Markdown
Member

Following up on the previous comments about episode mismatch with TMDB:
Do you think it would be a good idea to be able to enable this feature ONLY when TVDB is configured as metadata provider?
As said above, people will not understand why there are a lot of mismatch when they're using TMDB (the default metadata provider) and will constantly ask why there is a "bug".

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

0xSysR3ll commented Sep 4, 2025

Do you think it would be a good idea to be able to enable this feature ONLY when TVDB is configured as metadata provider?

Yep, I think so. But we should be pretty clear about this - with a tooltip or something.

@0xSysR3ll 0xSysR3ll force-pushed the feat-episode-availability branch from 6624144 to 5e586d6 Compare September 5, 2025 19:46
@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

@gauthier-th Just added a setting to make it optional. And sync only works when TVDB is set as metadata provider for either tv or anime.

Comment thread cypress/config/settings.cypress.json Outdated
Comment thread src/components/TvDetails/Season/index.tsx Outdated
Comment thread server/lib/availabilitySync.ts
Comment thread server/routes/tv.ts Outdated
@gauthier-th
Copy link
Copy Markdown
Member

Isn't it weird to display an "error" badge when the episode is not available but not released yet? Or not requested yet?

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

0xSysR3ll commented Sep 8, 2025

Isn't it weird to display an "error" badge when the episode is not available but not released yet? Or not requested yet?

Would an airdate check be enough? IMO the "Unavailable" badge should still appear even if the episode hasn't been requested. This could be changed later as part of the "per-episode request feature" ?

@gauthier-th
Copy link
Copy Markdown
Member

Isn't it weird to display an "error" badge when the episode is not available but not released yet? Or not requested yet?

Would an airdate check be enough? IMO the '‘Unavailable" badge should still appear even if the episode hasn't been requested yet.

I mean, we don't write the status of a season when it's not requested. We only write "Requested" or "Available"/"Partially Available". Not a status in the error color, implying an error when it's "just" missing

@0xSysR3ll
Copy link
Copy Markdown
Contributor Author

I mean, we don't write the status of a season when it's not requested. We only write "Requested" or "Available"/"Partially Available". Not a status in the error color, implying an error when it's "just" missing

Ah, that makes sense - my mistake. I thought it might be a small UX improvement, but you're right, it could be misleading.

@0xSysR3ll 0xSysR3ll force-pushed the feat-episode-availability branch from 5e586d6 to 2a62eb7 Compare September 8, 2025 19:26
Comment thread src/components/TvDetails/Season/index.tsx Outdated
@gauthier-th gauthier-th mentioned this pull request Sep 10, 2025
@0xSysR3ll 0xSysR3ll force-pushed the feat-episode-availability branch 2 times, most recently from e39ead7 to d477dd4 Compare April 25, 2026 07:29
This allows Jellyseerr to track the availability status of individual
episodes, enabling better status reporting for partially available seasons.
The PR should not fix the issue reported in recent tvdb PR.

Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
…ading

Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
…ilitySync to use getEpisodes

Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
@0xSysR3ll 0xSysR3ll force-pushed the feat-episode-availability branch from d477dd4 to 5c2bb1e Compare April 25, 2026 07:38
@0xSysR3ll 0xSysR3ll requested a review from gauthier-th April 27, 2026 14:03
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.

See which episode of a series is available and which not

7 participants