Repository navigation
fix(blocklist): stop tag job from rebuilding entries on every run - #3705
fallenbagel wants to merge 2 commits into
Conversation
The job deleted every tag-sourced media row on each run and recreated it, losing requests and resetting mediaAddedAt, and its first match overwrote media already in the library. It now diffs each run against the existing entries, skips media in the library or requested, and only removes stale entries when every discover query succeeded. fixes #3668
Walkthrough
Merge Risk:
|
seerr
|
||||||||||||||||||||||||||||
| Project |
seerr
|
| Branch Review |
fix/blocklisted-tags-media-wipe
|
| Run status |
|
| Run duration | 02m 25s |
| Commit |
|
| Committer | fallenbagel |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
33
|
| View all changes introduced in this branch ↗︎ | |
f44a4e3 to
4c6bf6f
Compare
4c6bf6f to
1d1450c
Compare
1d1450c to
b640d81
Compare
b640d81 to
b285ce7
Compare
Description
The Process Blocklisted Tags job deleted and recreated every tag-blocklisted media row on each run, taking that title's requests, seasons, issues and watchlist entries with it and resetting when it was added, so titles kept jumping to the top of Recently Added. The first time a title matched, it also blocklisted media already in the library.
The job now compares each run against the existing entries instead of rebuilding them, so a title that still matches keeps its media row. Media that is in the library or requested is never tag-blocklisted. A title that no longer matches loses its blocklist entry, and its media row is only removed if nothing else depends on it. If a discover query fails, existing entries are left as they are for that run.
How Has This Been Tested?
Added tests that run the job against a seeded database with TMDB mocked, covering media in the library, placeholders that still match or no longer match, failed queries, removed or invalid keywords and cancelled runs. The tests for the reported behaviour fail against the old job.
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit