"""Quick sanity check series-mismatch detector na realnych pendingach z bazy."""
from app.resolve.scoring import (
    detect_modifier_tags,
    detect_series_positions,
    series_mismatch_strength,
)

cases = [
    ("pleasureville a dp xxx parody episode 2", "pleasureville a dp xxx parody episode 4", "Episode 2/4"),
    ("make em sweat #7", "make em sweat #7 bts", "BTS asymmetric"),
    ("training ravyn", "training ravyn (bts - 1)", "BTS asymmetric"),
    ("women seeking women volume 140 scene 3", "women seeking women volume 140 scene 4", "Vol same scene diff"),
    ("women seeking women #131 scene 2", "women seeking women volume 139 scene 1", "Multi num"),
    ("bad bella stinky feet preparation 1080p", "bad bella stinky feet preparation (unedited) 1080p", "Unedited"),
    ("alexis fawx step son becomes a man part 1", "alexis fawx step son becomes a man part 2", "Part 1/2"),
    ("neon moonlight pt. 1", "neon moonlight pt. 2", "Pt 1/2"),
    ("internet outage poundage", "internet outage poundage alexis fawx", "Same scene"),
    ("the great heist", "the great heist", "Identical"),
    ("training ravyn", "training ravyn", "Identical"),
    ("slut hunt ep.6 ravyn", "slut hunt ep.6 ravyn full", "Same Episode 6"),
]
print(f'{"strength":>8}  case')
for a, b, desc in cases:
    s = series_mismatch_strength(a, b)
    pa = detect_series_positions(a)
    pb = detect_series_positions(b)
    ma = detect_modifier_tags(a)
    mb = detect_modifier_tags(b)
    print(f'{s:>8.2f}  {desc:25s}  pos={pa or "{}"} vs {pb or "{}"}  mod={ma or "{}"} vs {mb or "{}"}')
