Skip to content

feat: detect a missing jstsToken cookie without hitting Babelio - #38

Merged
xballoy merged 1 commit into
mainfrom
detect-missing-babelio-token
Sep 9, 2026
Merged

feat: detect a missing jstsToken cookie without hitting Babelio#38
xballoy merged 1 commit into
mainfrom
detect-missing-babelio-token

Conversation

@xballoy

@xballoy xballoy commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • If the Babelio jstsToken cookie is left blank in the plugin settings, searches and cover downloads now fail immediately with a clear "no cookie configured" message instead of sending a request to Babelio that was always going to be rejected.
  • This also stops an unconfigured cookie from repeatedly tripping the temporary IP-ban protection, since no real request is ever attempted.
  • The settings dialog's connection test and the README were updated to describe this new "missing" state distinctly from an expired/rejected one, so users know whether they need to add a token for the first time or refresh an old one.

Test plan

  • uv run --python 3.13 pytest — full suite passes, 100% coverage
  • uv run mypy and uv run ruff check — clean

Distinguish "no cookie configured" from "cookie rejected" (BabelioTokenMissing
vs BabelioBlocked) so search/cover requests fail fast with an actionable
message instead of tripping the circuit breaker on a request that was never
going to succeed. Centralize the error-to-message mapping in
message_for_error() so identify(), _run_workers(), and download_cover() stay
in sync.
@xballoy xballoy changed the title Detect a missing jstsToken cookie without hitting Babelio feat: detect a missing jstsToken cookie without hitting Babelio Sep 9, 2026
@xballoy
xballoy merged commit 8a8d9df into main Sep 9, 2026
5 checks passed
@xballoy
xballoy deleted the detect-missing-babelio-token branch September 9, 2026 16:20
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.

1 participant