-- ยง5.4: 4K if there is any, otherwise a good 1080p. The resolution step was -- 300 points, small enough that an on-target 1080p outranked a 4K a few -- gibibytes off its own target. 10 000 dwarfs every other term, so the -- preference list reads as tiers and the size, source and seeder terms only -- order releases inside one. -- -- With strict tiers a bloated 4K remux would beat every 1080p, so each band -- gains a ceiling. Above it a release is waived: never picked automatically, -- still a manual grab. Twice the target for 4K and two and a half times for -- 1080p, which on the seeded bands is 44 GiB and 20 GiB for movies, 12 GiB -- and 5 GiB per episode for TV. A band that already carries a ceiling keeps -- it. UPDATE policies SET score_weights = json_set(score_weights, '$.resolution_step', 10000), updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'); UPDATE policies SET size_bands = json_set( size_bands, '$."2160p".ceiling_gib', json_extract(size_bands, '$."2160p".target_gib') * 2 ), updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now') WHERE json_extract(size_bands, '$."2160p"') IS NOT NULL AND json_extract(size_bands, '$."2160p".ceiling_gib') IS NULL; UPDATE policies SET size_bands = json_set( size_bands, '$."1080p".ceiling_gib', CAST(json_extract(size_bands, '$."1080p".target_gib') * 5 / 2 AS INTEGER) ), updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now') WHERE json_extract(size_bands, '$."1080p"') IS NOT NULL AND json_extract(size_bands, '$."1080p".ceiling_gib') IS NULL;