Skip to content

Fix Bazarr spoof series IDs and SignalR WebSocket (DOWN badges) - #445

Open
zab1996 wants to merge 1 commit into
godver3:devfrom
zab1996:fix/bazarr-series-id-consistency
Open

Fix Bazarr spoof series IDs and SignalR WebSocket (DOWN badges)#445
zab1996 wants to merge 1 commit into
godver3:devfrom
zab1996:fix/bazarr-series-id-consistency

Conversation

@zab1996

@zab1996 zab1996 commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • Align Sonarr series IDs across HTTP spoof endpoints and SignalR events so Bazarr can sync/insert series and episode files consistently (TMDB-preferred IDs, empty IMDB handling, SignalR using series_resource['id']).
  • Fix Series/Movies DOWN badges by completing Bazarr’s websocket-only SignalR handshake: Werkzeug WebSocketAwareHandler injects werkzeug.socket, handles /signalr upgrades outside Flask middleware, and runs the JSON hub session via simple-websocket.

Runtime notes

  • Requires simple-websocket (already in requirements.txt).
  • The web server must use the new make_server(..., request_handler=WebSocketAwareHandler) path in run_server(). Stock app.run(...) alone will not clear DOWN badges, because Bazarr’s bundled signalrcore always opens WebSockets and ignores SSE-only negotiate responses.
  • Verified locally: Bazarr logs SignalR client for Sonarr/Radarr is connected and waiting for events after deploy; HTTP sync already worked (shows/movies present).

Test plan

  • Enable Bazarr Integration in Symlinked/Local (or Plex) mode and point Bazarr Sonarr/Radarr at cli_debrid
  • Confirm negotiate returns WebSockets in availableTransports
  • Confirm Bazarr log shows SignalR connected for Sonarr and Radarr (DOWN badges clear)
  • Confirm series/movie HTTP sync still works and series IDs stay consistent between /api/v3/series and SignalR episode-file events
  • Optional: trigger a media event and confirm Bazarr receives SignalR receiveMessage traffic

Made with Cursor

Keep Sonarr series IDs consistent across HTTP and SignalR, and complete Bazarr's websocket-only SignalR handshake via a Werkzeug handler so Series/Movies DOWN badges clear. Stock app.run alone is not enough; simple-websocket is required.

Co-authored-by: Cursor <cursoragent@cursor.com>
@zab1996
zab1996 force-pushed the fix/bazarr-series-id-consistency branch from 2ccf0ba to cf34287 Compare July 27, 2026 17:26
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