summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-09-26 08:56:20 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-09-26 08:56:20 +0000
commitd4b00e59086e1afc69464164a907bcfddd560a50 (patch)
treed06e2a142e266b41b8b50f4c26bb7f370747ea43 /tools
parentd0cc4dbdcbe2b339384f7915c45bc80abf8373a8 (diff)
Rank shows by what is still waiting, and seed the trailer filters
Two of Peter's asks. Ordering. A show ranked by its newest unplayed episode, so queueing something left the show sitting at the top with nothing actually waiting -- his words, once they're on the queue they're noise in the list. Queued episodes are now excluded from the ranking for the same reason played ones already were: they have been dealt with. That is one clause of SQL, and the fake DAOs return insertion order, so it is exactly the kind of rule that cannot be pinned off-device. LibraryOrderTest runs against a real in-memory Room database and covers the change, an older unqueued episode still counting, played episodes still not counting, and a show with nothing waiting sorting last rather than vanishing. Confirmed it fails without the fix before keeping it. Filters. Peter chose the existing rule engine over anything new, with the rules set up for him -- and rules live in the database on the phone, so a migration is the only way to put them there. MIGRATION_4_5 seeds "trailer" and "preview", both mark-played, as ordinary rules: they show up in the Rules screen and can be edited, disabled or deleted. Appended after whatever is already there rather than taking position 0, so they cannot pre-empt rules already relied on, and INSERT OR IGNORE on a fixed id means deleting one does not bring it back on the next upgrade. They act only on newly discovered episodes, so nothing already in the library changes. One judgement call worth flagging: "preview" will catch a sports show's legitimate Season preview. It is two taps to delete if it bites. Schema 4 -> 5, no shape change -- the migration only inserts rows. Covered by two instrumented tests: seeding after an existing rule, and a 1 -> 5 chain landing exactly two. No permission changes. 403 unit tests green, 10 instrumented, detekt and lint clean. Coverage 65.20 -> 64.90, exception recorded: the new code is a migration tested on a device, and the coverage report counts unit tests only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions