Skip to content

v1.2.2 — TMDB token auto-detection

Choose a tag to compare

@rusty4444 rusty4444 released this 21 Apr 12:24
· 5 commits to main since this release

Bug fix — TMDB token auto-detection

The card previously assumed the tmdb_api_key field contained a TMDB Read Access Token (the long JWT starting with eyJ...) and always sent it as a Bearer header. Users who pasted a v3 API key (the 32-character hex string) instead would get HTTP 401 on every TMDB request — no posters, no trailers.

What's new

  • Auto-detect token type. The card now inspects tmdb_api_key and picks the right auth method:

    • JWT starting eyJ...Authorization: Bearer <token> header (as before)
    • 32-char hex string → ?api_key=<token> query param
    • Anything else → one-shot console warning pointing to the TMDB API settings page
  • Either token now works out of the box. The Read Access Token remains the recommended choice, but pasting a v3 API key no longer silently breaks posters and trailers.

Fixes

  • Closes #3 — "TMDB API calls for TV shows and trailers are missing the 'api_key' parameter (HTTP 401)"

Upgrade

HACS will pick it up automatically, or refresh the resource URL with a new cache-busting query string. Clear config is unchanged — no action required if your existing Read Access Token works.