Files
peter 531eb2eef1 refactor(plex): playlists, playback, Discover and admin through the unit; the plex package is fenced
The last Plex HTTP files do no database work of their own, so ALLOWED is empty: no route builds
SQL, touches the session or a unit's table. Discover's rails move whole into plex/discover.py; a
user's playlists, watch-state writes (the race-safe finish, an early checkpoint, a status, a
season or show at once) and the watch-sync link go through plex/queries.py and plex/service.py.

The plex package joins FENCED: it reads no other unit's tables, says whose a row is through
userscope (the rollup and the watch sync's 8 inline filters moved to owned_by), and commits only in
its named jobs — the library sync, TMDB enrichment, the watch sync and its background pushes.
A playlist's has-item probe keeps the plain key lookup, so a NUL in it is still the 422 a test pins.

Pins 178 -> 0; basedpyright baseline 118 -> 106.
2026-10-19 22:42:46 +02:00

918 lines
26 KiB
JSON

{
"files": {
"./app/audit.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 18,
"endColumn": 26,
"lineCount": 1
}
}
],
"./app/debugsession.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 18,
"endColumn": 26,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 18,
"endColumn": 26,
"lineCount": 1
}
}
],
"./app/diagnostics.py": [
{
"code": "reportOptionalMemberAccess",
"range": {
"startColumn": 40,
"endColumn": 49,
"lineCount": 1
}
}
],
"./app/discover/pins.py": [
{
"code": "reportOptionalOperand",
"range": {
"startColumn": 8,
"endColumn": 9,
"lineCount": 5
}
}
],
"./app/discover/queries.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 50,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 33,
"endColumn": 44,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 33,
"endColumn": 44,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 33,
"endColumn": 44,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 28,
"endColumn": 39,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 28,
"endColumn": 39,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 28,
"endColumn": 39,
"lineCount": 1
}
}
],
"./app/discover/rails.py": [
{
"code": "reportCallIssue",
"range": {
"startColumn": 4,
"endColumn": 56,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 18,
"endColumn": 41,
"lineCount": 1
}
}
],
"./app/downloads/adapters.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 30,
"endColumn": 38,
"lineCount": 1
}
}
],
"./app/downloads/backfill.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 34,
"endColumn": 38,
"lineCount": 1
}
},
{
"code": "reportReturnType",
"range": {
"startColumn": 23,
"endColumn": 27,
"lineCount": 1
}
}
],
"./app/downloads/credentials.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 27,
"endColumn": 30,
"lineCount": 1
}
}
],
"./app/downloads/gc.py": [
{
"code": "reportOperatorIssue",
"range": {
"startColumn": 16,
"endColumn": 28,
"lineCount": 1
}
}
],
"./app/downloads/pipeline.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 34,
"endColumn": 38,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 22,
"endColumn": 27,
"lineCount": 1
}
},
{
"code": "reportGeneralTypeIssues",
"range": {
"startColumn": 10,
"endColumn": 18,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 31,
"endColumn": 36,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 36,
"endColumn": 43,
"lineCount": 1
}
}
],
"./app/downloads/service.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 18,
"endColumn": 26,
"lineCount": 1
}
}
],
"./app/downloads/urlguard.py": [
{
"code": "reportReturnType",
"range": {
"startColumn": 11,
"endColumn": 41,
"lineCount": 1
}
}
],
"./app/feedquery.py": [
{
"code": "reportCallIssue",
"range": {
"startColumn": 37,
"endColumn": 5,
"lineCount": 3
}
},
{
"code": "reportAssignmentType",
"range": {
"startColumn": 37,
"endColumn": 5,
"lineCount": 3
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 8,
"endColumn": 97,
"lineCount": 1
}
}
],
"./app/logsink.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 18,
"endColumn": 26,
"lineCount": 1
}
}
],
"./app/notifications.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 52,
"endColumn": 58,
"lineCount": 1
}
}
],
"./app/plex/lookups.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 48,
"endColumn": 58,
"lineCount": 1
}
}
],
"./app/plex/people.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 15,
"endColumn": 23,
"lineCount": 1
}
}
],
"./app/plex/sync.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 21,
"endColumn": 69,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 21,
"endColumn": 69,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 70,
"endColumn": 83,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 76,
"endColumn": 89,
"lineCount": 1
}
}
],
"./app/plex/tmdb.py": [
{
"code": "reportAssignmentType",
"range": {
"startColumn": 16,
"endColumn": 9,
"lineCount": 10
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 30,
"endColumn": 36,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 29,
"endColumn": 35,
"lineCount": 1
}
}
],
"./app/plex/watch_sync.py": [
{
"code": "reportReturnType",
"range": {
"startColumn": 11,
"endColumn": 5,
"lineCount": 11
}
}
],
"./app/ratelimit.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 14,
"endColumn": 25,
"lineCount": 1
}
}
],
"./app/routes/admin.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 9,
"endColumn": 13,
"lineCount": 1
}
}
],
"./app/routes/audit.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 37,
"endColumn": 45,
"lineCount": 1
}
}
],
"./app/routes/discover.py": [
{
"code": "reportInvalidTypeForm",
"range": {
"startColumn": 19,
"endColumn": 33,
"lineCount": 1
}
}
],
"./app/routes/plex/collections.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 20,
"endColumn": 45,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 20,
"endColumn": 46,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 56,
"endColumn": 59,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 56,
"endColumn": 59,
"lineCount": 1
}
},
{
"code": "reportOptionalMemberAccess",
"range": {
"startColumn": 39,
"endColumn": 47,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 56,
"endColumn": 59,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 46,
"endColumn": 49,
"lineCount": 1
}
}
],
"./app/routes/scheduler.py": [
{
"code": "reportOptionalMemberAccess",
"range": {
"startColumn": 25,
"endColumn": 28,
"lineCount": 1
}
},
{
"code": "reportOptionalMemberAccess",
"range": {
"startColumn": 25,
"endColumn": 28,
"lineCount": 1
}
}
],
"./app/sync/explore.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 6,
"endColumn": 14,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 6,
"endColumn": 14,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 6,
"endColumn": 14,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 6,
"endColumn": 14,
"lineCount": 1
}
}
],
"./app/sync/maintenance.py": [
{
"code": "reportOptionalOperand",
"range": {
"startColumn": 19,
"endColumn": 42,
"lineCount": 1
}
}
],
"./app/sync/playlists.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 55,
"endColumn": 72,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 51,
"endColumn": 68,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 39,
"endColumn": 56,
"lineCount": 1
}
}
],
"./app/sync/runner.py": [
{
"code": "reportAssignmentType",
"range": {
"startColumn": 19,
"endColumn": 88,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 16,
"endColumn": 24,
"lineCount": 1
}
},
{
"code": "reportOptionalIterable",
"range": {
"startColumn": 23,
"endColumn": 31,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 45,
"endColumn": 72,
"lineCount": 1
}
},
{
"code": "reportAssignmentType",
"range": {
"startColumn": 19,
"endColumn": 9,
"lineCount": 7
}
},
{
"code": "reportOptionalSubscript",
"range": {
"startColumn": 19,
"endColumn": 27,
"lineCount": 1
}
},
{
"code": "reportOptionalIterable",
"range": {
"startColumn": 23,
"endColumn": 31,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 47,
"endColumn": 55,
"lineCount": 1
}
}
],
"./app/sync/videos.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 18,
"endColumn": 26,
"lineCount": 1
}
}
],
"./app/worker.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 36,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 36,
"endColumn": 40,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 35,
"endColumn": 43,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 24,
"endColumn": 32,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 28,
"endColumn": 36,
"lineCount": 1
}
}
]
}
}