refactor(release): simplify SHITTY to dict-driven token tagging
Replace the ~480-line legacy heuristic block in services.py with a small dict-driven pass in pipeline._annotate_shitty: each token is looked up against the kb buckets (resolutions / sources / codecs / distributors / year / sxxexx) with first-match-wins semantics, the leftmost contiguous UNKNOWN run becomes the title, done. SHITTY's scope is intentionally narrow — releases that *look* like scene names but don't have a registered group schema. Anything more exotic (parenthesized tech, bare-dashed title fragments, YT slugs, franchise boxes) is PATH OF PAIN territory and stays out of here. - annotate() no longer returns None; SHITTY is the always-on fallback - services.py shrunk from ~525 to ~85 lines (legacy extractors gone) - 4 fixtures get xfail markers documenting PoP-grade pathologies (deutschland franchise box, sleaford YT slug, super_mario bilingual, predator space-separators — the last one moved from shitty/ → pop/) - ReleaseFixture grows xfail_reason; the parametrized suite wires the pytest.mark.xfail(strict=False) automatically
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
release_name: "Predator Badlands 2025 1080p HDRip HEVC x265 BONE"
|
||||
|
||||
# Space-separated release: tokenizer correctly splits and identifies year +
|
||||
# tech, but the dash-before-group convention is absent so 'BONE' is not
|
||||
# recognized as the group — falls to UNKNOWN. Anti-regression baseline.
|
||||
parsed:
|
||||
title: "Predator.Badlands"
|
||||
year: 2025
|
||||
season: null
|
||||
episode: null
|
||||
quality: "1080p"
|
||||
source: "HDRip"
|
||||
codec: "x265"
|
||||
group: "UNKNOWN"
|
||||
tech_string: "1080p.HDRip.x265"
|
||||
media_type: "movie"
|
||||
parse_path: "direct"
|
||||
is_season_pack: false
|
||||
|
||||
tree:
|
||||
- "Predator Badlands 2025 1080p HDRip HEVC x265 BONE/"
|
||||
- "Predator Badlands 2025 1080p HDRip HEVC x265 BONE/Predator Badlands 2025 1080p HDRip HEVC x265 BONE.mkv"
|
||||
|
||||
routing:
|
||||
library:
|
||||
- "Predator Badlands 2025 1080p HDRip HEVC x265 BONE/Predator Badlands 2025 1080p HDRip HEVC x265 BONE.mkv"
|
||||
torrents:
|
||||
- "Predator Badlands 2025 1080p HDRip HEVC x265 BONE/"
|
||||
seed_hardlinks:
|
||||
- source: "library/Predator Badlands 2025 1080p HDRip HEVC x265 BONE/Predator Badlands 2025 1080p HDRip HEVC x265 BONE.mkv"
|
||||
target: "torrents/Predator Badlands 2025 1080p HDRip HEVC x265 BONE/Predator Badlands 2025 1080p HDRip HEVC x265 BONE.mkv"
|
||||
Reference in New Issue
Block a user