metadata: StarTrack ratings should survive a Radarr upgrade without a hand re-key #350
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker#350
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
StarTrack keys everything (ratings, diary, lists, watchlist, likes) by Jellyfin item id, and Jellyfin hashes that id from the file path. Every Radarr upgrade therefore leaves the rating on an id that no longer exists. #340 made
featured_sync.pyreport each orphan once with itsOLD=NEWpair and addedstartrack_rekey.py, but the re-key is still a hand step: stop Jellyfin, run the script as uid 948, start Jellyfin, because the plugin holds its json in memory and rewrites it whole on save. Four orphans were re-keyed on 2026-10-01 and a fifth (Wolf Children) appeared the same day, so this recurs at the upgrade rate.Pieces, in order of how much they settle:
Provider-id ledger in the pipeline (pipeline only, do first). Each night record
item id -> ProviderIds (Tmdb/Imdb/Tvdb), name, year, typefor every item StarTrack has a rating on, intostate/startrack_ledger.json. Today the mapping leans onmovie_poster_state.json, which only knows movies the poster sync processed: one orphan (4c443647…, a 4.5★ Letterboxd import from 2026-05-04) has no record anywhere and is unrecoverable. With the ledger, series and anime resolve too, and nothing rated after this lands can go unidentified.Re-link inside the plugin (upstream, durable). StarTrack already resolves items through
ILibraryManager. Either subscribe toItemRemoved/ItemAddedand move entries when provider ids match, or store provider ids beside each rating at submit time and resolve lazily on read. No restart, no host step, and it fixes it for every StarTrack user. The upstream tracker has nothing on it (8 open issues as of 2026-09-27); #25 there (persist unmatched Letterboxd ratings) is adjacent.Admin re-key endpoint (upstream, smaller).
POST /Plugins/StarTrack/Rekey {old, new}behindRequiresElevation, so the nightly job can finish the move itself with the server API key and the in-memory store stays consistent. A fallback if 2 is too much.Not worth it: a Dagu step that stops Jellyfin, edits the json and starts it again. It puts a nightly outage and a docker socket on the path to fix a plugin-shaped problem.