Fix TMDB backdrop lookup calling base_params as an attribute - #800
Merged
ryan-winkler merged 1 commit intoAug 16, 2026
Merged
Conversation
tmdb.base_params is a function, but the backdrop lookup used tmdb.base_params.copy(). The resulting AttributeError was swallowed by the surrounding best-effort except, so every backdrop request failed and the placeholder was cached for 24 hours.
ryan-winkler
approved these changes
Aug 16, 2026
ryan-winkler
left a comment
There was a problem hiding this comment.
Reviewed at 8d166979e40979f1f71e8317a3ddbf44f0ea0b5c.
Result
Approved. I found no blocking functional, security, test, documentation, or accessibility issue in this change.
What I checked
tmdb.base_params()is the current provider-owned source for the TMDB API key and language parameters.- The lookup still uses Floppy's fixed TMDB endpoint. This change does not add a user-controlled request target or a new request path.
- The change does not add credential, response-body, or private-data logging.
- The focused tests cover a returned backdrop and the existing placeholder fallback. They also isolate the cache and verify that the request receives the required API key and language parameters.
- GitHub Actions passed the application tests, lint, frontend build, dependency checks, SBOM generation, and Snyk checks for this head.
Relationships and contract impact
- This affects the same Now Playing presentation surface as #801, but the fixes are independent and do not need to merge together.
- I did not find an open issue that owns this exact missed
base_params()call. The PR contains the reproduction, acceptance behavior, and regression coverage, so a separate issue would add no useful ownership. - No API, OpenAPI, schema, migration, generated vocabulary, or documentation change is required.
Maintenance note
Keep TMDB request defaults in tmdb.base_params() so authentication and language behavior continue to have one shared source.
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.
Problem
No TMDB backdrop ever loads.
CustomList._get_tmdb_backdrop()builds its request params withbut
tmdb.base_paramsis a function (src/app/providers/tmdb.py:47), not a dict. That raisesAttributeError, which the surrounding best-effortexcept Exception: passswallows, so the lookup silently returns the placeholder — and caches it for 24 hours.I noticed it because the Now Playing card kept showing a grey placeholder for a film that clearly has backdrops on TMDB. Checking the API directly for two of them returned 29 and 13 backdrops respectively, both with
backdrop_pathset, while Floppy returnedNonefor each.Every other call site in the codebase already calls it correctly as
base_params(language); this one looks like it was missed when it changed from a constant to a function.Solution
Call it:
Two tests cover the lookup, which had none: one asserts the URL is built from the response and that the request carries
api_key/language, one asserts a title without a backdrop still yields the placeholder. The first fails against the old code.Validation
Verified on my own instance: after the fix both films resolve to their real backdrop URLs instead of the placeholder.
No template, CSS or layout change — the card renders exactly as before, it just gets a working image URL now. Backend only, so no screenshots.
AI Assistance
Found and fixed with Claude Code (claude-opus-5).