Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xxx should be parsed as movie title #773

Open
milahu opened this issue May 7, 2024 · 0 comments
Open

xxx should be parsed as movie title #773

milahu opened this issue May 7, 2024 · 0 comments

Comments

@milahu
Copy link

milahu commented May 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant