fix: fall back to tmdb/tvdb/kitsu ids for imdb-less custom art#569
Open
IbbyLabs wants to merge 1 commit into
Open
fix: fall back to tmdb/tvdb/kitsu ids for imdb-less custom art#569IbbyLabs wants to merge 1 commit into
IbbyLabs wants to merge 1 commit into
Conversation
Custom art patterns that reference {imdb_id} (e.g. an episode thumbnail
pattern like /thumbnail/{imdb_id}/S{season}E{episode}.jpg) resolve to
nothing when the title has no IMDb ID, which is common for anime resolved
via TVDB or Kitsu. The resolver returned null and the image rendered blank
even though the art service can serve the episode by another ID.
Retry with an available ID in a form these services accept in the same
path slot: tmdb:{type}:{id}, tvdb:{id}, kitsu:{id}. Gated on {imdb_id}
appearing in the URL path, so a composite ID never corrupts a
'?imdb_id=' query parameter used by other art providers.
Contributor
PR Guard
Maintainers may still close PRs that do not match project direction or review capacity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Custom art patterns that reference
{imdb_id}(e.g. an episode thumbnail pattern like/thumbnail/{imdb_id}/S{season}E{episode}.jpg) resolve to nothing when the title has no IMDb ID, which is common for anime resolved via TVDB or Kitsu. The resolver returnednulland the image rendered blank even though the art service can serve the episode by another ID. This adds an ID fallback: when{imdb_id}is unavailable, retry with an available ID in a form these services accept in the same path slot (tmdb:{type}:{id},tvdb:{id},kitsu:{id}).Linked issue
Closes #568
Type of change
Why this approach
It mirrors the existing RPDB/TOP id-fallback (
resolveRatingPosterUrl), but for self-hosted art services that key by path segment. The fallback is gated on{imdb_id}appearing in the URL path (before?), so a composite id liketmdb:series:123is only injected where it's a valid path segment and never corrupts a?imdb_id=query parameter used by other art providers. When no usable id exists it still returnsnull, preserving the current behaviour of keeping the meta-provided image. It reusesresolvePatternrather than duplicating substitution logic.Testing
Verified the resolver output for the imdb-present, anime (kitsu/tvdb/tmdb only), no-id, and query-param (
?imdb_id=) cases: anime now resolves tokitsu:/tvdb:/tmdb:series:forms, imdb-present is unchanged, no-id returns null, and query-param patterns are left untouched. Confirmed end to end that the produced URLs return HTTP 200 images from the live art service for kitsu/tvdb/tmdb ids.node --checkpasses. There is no existing test harness around this resolver to extend.Documentation
Author checklist
CONTRIBUTING.md.AI usage disclosure
If AI tools were used, briefly describe how: used to trace the resolver path and verify the fallback output across id cases and against the live art service; all changes were reviewed and verified.