Scrobble
Internal blueprint for the scrobble pipeline (event parsing, filtering, and sink dispatch).
Last updated
Was this helpful?
Internal blueprint for the scrobble pipeline (event parsing, filtering, and sink dispatch).
This section documents the scrobble pipeline under providers/scrobble/.
It also covers the legacy webhook bridge under providers/webhooks/.
Scrobbling pushes playback progress to trackers in real time.
It uses three pieces:
providers (Plex/Jellyfin/Emby) that produce events
a dispatcher that filters and dedupes
sinks (Trakt/SIMKL/MDBList) that send events outbound
core model + dispatcher: providers/scrobble/scrobble.py
watch providers: providers/scrobble/<provider>/watch.py
sinks: providers/scrobble/<sink>/sink.py
runtime state writers: providers/scrobble/currently_watching.py, providers/scrobble/_auto_remove_watchlist.py
legacy webhook bridge: providers/webhooks/*.py
ScrobbleEventCommon fields:
action: start, pause, stop
media_type: movie, episode
ids: IMDb/TMDb/TVDb tokens (when present)
progress: 0–100
server_uuid, username, session_key for filtering and dedupe
raw payload for debugging
Supported Plex shapes:
PlaySessionStateNotification (from_plex_pssn)
flat playing objects (from_plex_flat_playing)
webhook wrapper (from_plex_webhook)
ID extraction relies on Plex GUID patterns:
imdb://tt...
tmdb://...
thetvdb://...
The dispatcher enforces:
server UUID + username allowlists
pause debounce (defaults to 5s)
per-session last action and last progress tracking
/config/.cw_state/currently_watching.json
/config/.cw_state/watchlist_wl_autoremove.json (TTL dedupe)
Last updated
Was this helpful?
Was this helpful?