591cf27dc5
A pack that hard-failed at import blacklisted its release, put every episode back to missing and left the season reading 0/10, with nothing on screen joining the two. Every fact was already recorded. The blacklist now carries its reason out of the database: deck rows read `blacklisted · size` instead of a bare `blacklisted`, and say whether the policy turned the file down — relaxable for this title — or the release itself failed, which a retry only repeats. A season whose pack was abandoned says so on its row and above its deck, with the release name, when it failed, and what it failed on. A row the blacklist no longer answers for keeps rendering and claims no reason. Two defects from the integration review of #211 sit in the same code and are fixed here: a waived row threw away the rule it now carries and read a bare `below policy`, and the empty-eligible count called every waived row force-grabbable, since #211 gave those rows the rule `overridable` reads. Verified against a real browser: series detail, both season decks and their buckets, at 1280 and 390 px. Refs #227, #211
75 lines
2.4 KiB
JSON
75 lines
2.4 KiB
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "SELECT g.target_id AS \"season_id!: i64\",\n r.name AS \"name!: String\",\n g.infohash AS \"infohash!: String\",\n g.failed_at,\n g.grabbed_at AS \"grabbed_at!: String\"\n FROM grabs g\n JOIN releases r ON r.id = g.release_id\n JOIN seasons s ON s.id = g.target_id\n WHERE g.target_kind = 'season'\n AND g.state = 'failed'\n AND s.series_id = ?\n AND EXISTS (\n SELECT 1 FROM episodes e\n WHERE e.season_id = s.id AND e.wanted\n AND NOT EXISTS (\n SELECT 1 FROM media_files f\n WHERE f.owner_kind = 'episode' AND f.owner_id = e.id\n )\n )\n ORDER BY coalesce(g.failed_at, g.grabbed_at), g.id",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "season_id!: i64",
|
|
"ordinal": 0,
|
|
"type_info": "Integer",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "grabs",
|
|
"name": "target_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "name!: String",
|
|
"ordinal": 1,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "releases",
|
|
"name": "name"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "infohash!: String",
|
|
"ordinal": 2,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "grabs",
|
|
"name": "infohash"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "failed_at",
|
|
"ordinal": 3,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "grabs",
|
|
"name": "failed_at"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "grabbed_at!: String",
|
|
"ordinal": 4,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "grabs",
|
|
"name": "grabbed_at"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false
|
|
]
|
|
},
|
|
"hash": "3f252a992c1bc5b18bb4467d1c4fd4137966a469b134fbeb51fb91f67951cbbe"
|
|
}
|