Skip to content

feat: add TVDB fallback IDs and DVD season overrides with updated UI - #610

Closed
shivsah wants to merge 1 commit into
cedya77:devfrom
shivsah:feat/tvdb-dvd-overrides
Closed

feat: add TVDB fallback IDs and DVD season overrides with updated UI#610
shivsah wants to merge 1 commit into
cedya77:devfrom
shivsah:feat/tvdb-dvd-overrides

Conversation

@shivsah

@shivsah shivsah commented Jul 26, 2026

Copy link
Copy Markdown

Summary

Some series on TheTVDB require a different season order (such as DVD or Absolute) than the global default to display correctly in Stremio. This PR adds support for per-series TVDB season order overrides by allowing users to configure a fallback season order and a comma-separated list of TVDB series IDs that should use it. Existing behavior remains unchanged unless a series is explicitly configured.

Linked issue

Closes #607

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Tests only
  • Documentation only
  • CI / tooling

Why this approach

The existing global TVDB season order remains as it is, minimizing changes for existing users while providing a simple way to handle exceptions for specific series. The implementation determines the effective season order before requesting episode data, preserving the existing caching and fallback behavior without introducing additional complexity. The frontend groups the primary and fallback season order settings together and provides a dedicated field for configuring the affected TVDB IDs.

Testing

Tested in a local development environment using Docker (compose.dev.yaml) with Redis.

Verified:

  • The frontend builds successfully.

  • The new TVDB settings UI renders correctly on desktop and mobile.

  • Configuration updates correctly through the UI.

  • Series listed in the fallback IDs use the configured fallback season order.

  • Series not listed continue using the global season order.

  • Metadata loads correctly in Stremio using a generated configuration (verified with Ascendance of a Bookworm).

  • Existing configurations correctly default tvdbSeasonTypeFallback to dvd and normalize tvdbFallbackIds.

  • I ran existing tests relevant to this change.

  • I added or updated tests where needed.

  • No tests were needed, and I explained why.

Documentation

  • I updated documentation or comments where needed.
  • No documentation updates were needed.

Author checklist

  • This PR is focused on one concern.
  • This PR is reasonably small and reviewable.
  • I read and followed CONTRIBUTING.md.
  • I can explain every code change in this PR.
  • I will respond to review feedback myself.

AI usage disclosure

  • No AI tools were used.
  • AI tools were used for part of this PR, and I personally reviewed and verified all changes.

If AI tools were used, briefly describe how:

I used an AI assistant to help troubleshoot a React state bug with the fallback IDs text input, and to help structure the side-by-side Tailwind CSS grid layout for the UI component. All code changes were implemented, tested, and verified by me before submission.

Normalize tvdbFallbackIds to an array of trimmed strings and
default tvdbSeasonTypeFallback to "dvd" for older configurations.

This ensures configuration is in a consistent format before use.
@github-actions

Copy link
Copy Markdown
Contributor

PR Guard

  • All automated intake checks passed.

Maintainers may still close PRs that do not match project direction or review capacity.

@shivsah shivsah closed this Jul 26, 2026
@shivsah shivsah reopened this Jul 26, 2026
@shivsah

shivsah commented Jul 26, 2026

Copy link
Copy Markdown
Author

const cacheKey = series-episodes:${tvdbId}:${language}:${effectiveSeasonType};
already exists to avoid cache conflicts between different season types for users.

@Arcitec

Arcitec commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

I've thought about this proposal:

  • The anime that sparked this idea, "Ascendance of a Bookworm", is a problematic anime where the show creators themselves made a mess of episode numbering/seasons, and TheTVDB's solution is both closer to the original intent and wrong at the same time (the show officially made everything into one long season, but restarted at "episode number 37" back to being called "episode 1" again): Support per-series TVDB season order overrides #607 (comment)
  • Having to manually write a comma separated list of TVDB IDs is clunky and not good user experience.
  • There are 7+ different orders on TheTVDB, with the most interesting being Aired Order, Official Order, DVD Order and Story Order (the last one is usable on some shows like One Piece to sort it by arcs). This PR only covers a single alternative order.
  • The user having to manually override series order by inputting their TheTVDB IDs is in general a bad user experience.

So, to sum up, it's a user-unfriendly manual ID override with a clunky comma-separated list for an incomplete alternative ordering idea, inspired by a show whose ordering is officially messy and disputed but works fine as a single season (every episode is listed).

I understand that work went into it and that there are shows on TheTVDB where other orderings are better, but I am not convinced that this user interface is the right solution.

@0xConstant1 @cedya77

@shivsah

shivsah commented Jul 28, 2026

Copy link
Copy Markdown
Author

I agree with @Arcitec .. i think closing this PR for now seems to be a better idea.. the initial thought was to make it easy for individuals to switch mode for titles.. but now it looks like maybe just a text one for advanced might be better (but that depends on how you want it.. we can just add an advanced option that show when toggled to allow per show - individual ordering) so normal users don't have to worry about it..

instead of a dropdown of fallback ids..

advanced user can toggle it one or open the text box and type in an accepted format ["tvdbid":"ordering_type"] seprated by commas

@Arcitec

Arcitec commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@shivsah Yeah, being able to specify different orders for different TV/anime shows is an improvement.

But the question of a good user interface is still unsolved. A single text box is very error-prone and clunky. A way to enter one ID and one order (via dropdown), which then gets added to a scrolling list which shows the actual show title + id + order, is an improvement.

And before you start any work, be sure that cedya actually wants to go down that route. :) This needs to go back to the planning stage to settle A) is it desirable (the appeal of setting One Piece to Story Order is a good example), B) can it cause any problems (such as failed/incorrect episode mappings), C) what's a good UI design for it. Join the AIOStreams #aiometadata discord channel if you haven't.

@shivsah

shivsah commented Jul 28, 2026

Copy link
Copy Markdown
Author

@shivsah Yeah, being able to specify different orders for different TV/anime shows is an improvement.

But the question of a good user interface is still unsolved. A single text box is very error-prone and clunky. A way to enter one ID and one order (via dropdown), which then gets added to a scrolling list which shows the actual show title + id + order, is an improvement.

And before you start any work, be sure that cedya actually wants to go down that route. :) This needs to go back to the planning stage to settle A) is it desirable, B) what's a good UI design for it. Join the AIOStreams #aiometadata discord channel if you haven't.

Hmm seems like a good idea.. i'll think about Discord.. i barely open it..xd

I thought of using the existing title search one, which auto-populates the id without showing it to the user, so he only sees the title name.. but that's a discussion for a later stage.. for now i'l just keep using the manual overwriting of my redis cache to change it from list of episodes to seasons "Random Script for forcing the series data change in Redis"

I'll look into Kitsu and AniDB for now.. if the name query one interests you lemme know, i'll look into it in sometime..

BTW Kitsu might require a new processor file, as i don't wanna touch the existing Kitsu.ts too much.. would it be okay ?

@Arcitec

Arcitec commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Most of the questions can only be answered by boss-man @cedya77.

And yeah, I think the idea of doing a title search and having a dropdown to select the correct TVDB show is a huge improvement over manual ID input.

But all of this needs some discussion with the main developers, preferably in the official discord channel. :)

@0xConstant1

Copy link
Copy Markdown
Collaborator

Going to be closing this as no one seems to be finding this approach elegant

@0xConstant1 0xConstant1 closed this Aug 3, 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.

Support per-series TVDB season order overrides

3 participants