guessit icon indicating copy to clipboard operation
guessit copied to clipboard

xxx should be parsed as movie title

Open milahu opened this issue 1 month ago • 0 comments

there is at least one movie called xXx

guessit 3.8.0 returns

>>> print(json.dumps(guessit.guessit("xXx.2002.mp4"), indent=2))
{
  "other": "XXX",
  "year": 2002,
  "container": "mp4",
  "mimetype": "video/mp4",
  "type": "movie"
}

expected: guessit should look for any.string.2000 or any.string.3000.2000 and parse everything before the year as title

workaround

filepath = "/a/b\\c\\d\\xXx.2002.mp4"
filename = re.split(r"[/\\]", filepath)[-1]
parsed = guessit.guessit(filename)
title = parsed.get("title") or filename.split(str(parsed.get("year")))[0][:-1]
assert title == 'xXx'

example filenames

xXx.2002.mp4
xXx.2002.720p.BDRip.aac-YTS.mp4
XXx.2002.15TH.ANNIVERSARY.EDITION.REPACK.720p.BluRay.x264.AAC-YTS.mp4
xXx.Triple.X.2002.REMASTERED.German.AC3.DL.1080p.BluRay.x264-HQXD.mkv

see also #246

milahu avatar May 07 '24 06:05 milahu