mirror of https://github.com/Nezreka/SoulSync.git
Reported by kettui on PR #374 review: > api_track_count is not copied during the ratingKey migration, so > the cache disappears when an album row is rekeyed. Add it to > enrichment_cols or the next completeness scan will fall back to > live API lookups again. When Plex changes an album's ratingKey (after a library rescan), the sync code rekeys the album row by inserting a new row at the new ID and copying enrichment columns from the old row. The list of columns to copy did not include `api_track_count`, so the cached authoritative track count was lost on rekey — and the next completeness scan would hit the fallback path that calls back out to the metadata source's API. Defeats the cache. Added `api_track_count` to the album-level `enrichment_cols` at `music_database.py:4724`. The artist-level lists at lines 4238 and 4554 don't need updating — those are for artist rekeys and don't carry album-scoped fields. No new test — existing migration code has no test infrastructure and writing a Plex-mocked one is larger than this fix. Cin will say if he wants test coverage in his next review pass. Credit: kettui — PR #374 review comment that flagged the missing column in the rekey allowlist.pull/374/head
parent
6c90d68de3
commit
751b19c7b1
Loading…
Reference in new issue