Generalise protected libraries into keep marks
Watch data cannot tell you what is valuable, only what is unwatched. Some content is held deliberately - home video, 4K copies that are expensive to re-acquire, shows kept in case someone wants them later - and that judgement has to be stated by a human and be un-overridable by the score. One 'keep' concept, applied at four levels: library (a rule, so future additions inherit it), show, season, movie. Explicit marks below the library can point either way, so 'keep all of 4K Movies except this one' is expressible rather than a dead end. The important detail is identity. Plex reassigns ratingKeys on library rebuilds and rematches, so marks are keyed on content guid instead - (library_id, guid) for movies and shows, (library_id, show_guid, season_number) for seasons. A keep list that silently detaches from its content would, in v2, mean deleting something explicitly protected. That is now the single most important test in the suite. Marks are scoped per library on purpose: Movies and 4K Movies share guids, so an unscoped mark would protect both copies at once. Also: kept items hidden from the grid by default with a toggle; a Kept items screen that surfaces orphaned marks rather than carrying them silently; the dashboard always shows never-played / kept / available as three numbers so a growing keep list cannot quietly hollow out the report; nightly export of keeps and views to JSON, since they are the only data in the database not reconstructible from Plex and Tautulli; and v2 deletion refuses kept items ahead of every other guardrail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVbG48GAXfCZatcmX123Ra
This commit is contained in:
parent
5e57fd1614
commit
1ba03dca70
3 changed files with 262 additions and 51 deletions
|
|
@ -43,6 +43,7 @@ SCORE_REJECTED_AT=2
|
|||
SCORE_SOLITUDE_AT=3
|
||||
SCORE_GRACE_DAYS=30
|
||||
|
||||
# Libraries that must never be scored as deletion candidates (comma-separated).
|
||||
PROTECTED_LIBRARIES=Family Videos
|
||||
# Libraries kept wholesale, seeded on first run only (comma-separated).
|
||||
# Editable in the UI afterwards; this value is not re-applied on later starts.
|
||||
KEEP_ALL_LIBRARIES=Family Videos
|
||||
SCORE_RECENT_DAYS=90
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue