goon/scripts/check_series_detector.py
https://github.com/goon-foss/goon 642f1ab8b8 Mobile 0.1.9: OTA enable, WebView cookie-dismiss fix, porndoe connector
Mobile / OTA:
- Enable Expo Updates (app.json + AndroidManifest) → api.goon-foss.org
- Bump 0.1.6 → 0.1.9 (build.gradle, app.json, appVersion.ts, main.py /version)
- backend.ts: default public backend auto-connect (no manual login)

WebView fallback fix (PlayerScreen INJECTED_JS):
- Auto-dismiss cookie/consent gates (hqporner et al. blocked kt_player init)
- Context-scoped: only clicks consent buttons inside cookie/gdpr containers
- Retry window for <source>.src polling raised 5→15 ticks (post-dismiss init)

Resolver:
- Series-position + modifier mismatch detector (Episode 2≠4, BTS/unedited)
  → composite_score hard-reject / cap; wired into scene_score + bulk_dedup
- aggregator-mode candidate query: LIMIT 500 + title-match ordering

Connectors:
- porndoe.com browse scraper (JSON-LD VideoObject) — theporndude audit pilot

landing: APK links → goon-v0.1.9.apk

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 11:20:57 +02:00

29 lines
1.5 KiB
Python

"""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 "{}"}')