guessit-io / guessit

GuessIt is a python library that extracts as much information as possible from a video filename.
https://guessit-io.github.io/guessit
GNU Lesser General Public License v3.0
824 stars 91 forks source link

Issue matching "X-Men '97" #770

Open soredake opened 7 months ago

soredake commented 7 months ago
❯ guessit -i '.\X-Men ''97\Season 1\X-Men ''97 - S01E01 - To Me, My X-Men WEBDL-2160p.mkv'
For: .\X-Men '97\Season 1\X-Men '97 - S01E01 - To Me, My X-Men WEBDL-2160p.mkv
GuessIt found: {
    "title": [
        "X",
        "Men '97"
    ],
    "season": 1,
    "episode_title": "X-Men '97",
    "episode": 1,
    "source": "Web",
    "screen_size": "2160p",
    "container": "mkv",
    "mimetype": "video/x-matroska",
    "type": "episode",
    "input_string": ".\\X-Men '97\\Season 1\\X-Men '97 - S01E01 - To Me, My X-Men WEBDL-2160p.mkv"
}

https://github.com/iamkroot/trakt-scrobbler/issues/286

offbyone commented 7 months ago

This happens with X-Men too:

$ guessit -i 'X-Men.S05.DVDRip.x264-BTN/S05E07 - Old Soldiers.mkv'
For: X-Men.S05.DVDRip.x264-BTN/S05E07 - Old Soldiers.mkv
GuessIt found: {
    "title": [
        "X",
        "Men"
    ],
    "season": 5,
    "source": "DVD",
    "other": "Rip",
    "video_codec": "H.264",
    "release_group": "BTN",
    "episode": 7,
    "container": "mkv",
    "mimetype": "video/x-matroska",
    "type": "episode",
    "input_string": "X-Men.S05.DVDRip.x264-BTN/S05E07 - Old Soldiers.mkv"
}

That title is just wrong; it should be a string, right?

Full verbose output ``` $ guessit -v -i 'X-Men.S05.DVDRip.x264-BTN/S05E07 - Old Soldiers.mkv' For: X-Men.S05.DVDRip.x264-BTN/S05E07 - Old Soldiers.mkv Pattern has 2 match(es). (.mark_path at 0x10551b600>,)>) Marker found. () Marker found. () Pattern has 6 match(es). (s)(?P\\d+)[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]?(?Pxe|ex|ep|e|x|d)[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]?(?P\\d+)']>({1,None}), (?:xe)|(?:ex)|(?:ep)|(?:e)|(?:x)|(?:d)|(?:\\+)|(?:\\&)|(?:and)|(?:et)|(?:\\ )|(?:\\[)|(?:\\])|(?:\\()|(?:\\))|(?:\\{)|(?:\\})|(?:\\+)|(?:\\*)|(?:\\|)|(?:=)|(?:_)|(?:\\#)|(?:\\.)|(?:,)|(?:;)|(?::)|(?:\\-)|(?:\\~)|(?:to)|(?:a))(?P\\d+)']>({0,None})]>) Match found. () Match found. () Match found. (<5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>) Match found. () Match found. (<7:(30, 32)+name=episode+tags=['SxxExx']+initiator=S05E07>) Match found. () Pattern has 4 match(es). (s)(?P\\d+)']>({1,1}), Extras)']>({0,1}), (?:s)|(?:\\+)|(?:\\&)|(?:and)|(?:et)|(?:\\ )|(?:\\[)|(?:\\])|(?:\\()|(?:\\))|(?:\\{)|(?:\\})|(?:\\+)|(?:\\*)|(?:\\|)|(?:=)|(?:_)|(?:\\#)|(?:\\.)|(?:,)|(?:;)|(?::)|(?:\\-)|(?:\\~)|(?:to)|(?:a))(?P\\d+)']>({0,None})]>) Match found. () Match found. () Match found. (<5:(7, 9)+name=season+tags=['SxxExx']+initiator=S05>) Match found. () Pattern is disabled. (episode|episodes|eps|ep|episodio|episodios|capitulo|capitulos)[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]?(?P(?:\\d{1,4}|(?=[MCDLXVI]+)M{0,4}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3})|(?:(?=\\w+)zero|one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|zéro|un|deux|trois|quatre|cinq|six|sept|huit|neuf|dix|onze|douze|treize|quatorze|quinze|seize|dix[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]sept|dix[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]huit|dix[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]neuf|vingt|zero|une|deux|trois|quatre|cinq|six|sept|huit|neuf|dix|onze|douze|treize|quatorze|quinze|seize|dixsept|dixhuit|dixneuf|vingt)))(?:v(?P\\d+))?(?:[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]?(?:of|sur)[\\ \\[\\]\\(\\)\\{\\}\\+\\*\\|=\\-_\\~\\#\\.,;:]?(?P\\d+))?']>) Pattern is disabled. (\\d)']>({1,1}), \\d+)']>({0,1}), [x-])(?P\\d{1,2})']>({0,None})]>) Pattern has 1 match(es). () Match found. () Pattern has 1 match(es). () Match found. () Pattern has 3 match(es). (Rip))?']>) Match found. () Match found. () Match found. () Pattern has 2 match(es). () Match found. () Match found. () Pattern has 1 match(es). () Match found. () Pattern is disabled. (.expected at 0x1056cd6c0>,)>) Pattern has 1 match(es). () Match found. () Pattern has 2 match(es). () Match found. () Match found. (<264:(18, 21)+name=bonus+initiator=x264>) 2 independent rule(s) at priority 2048. Checking rule condition: Conflicting match will be removed in favor of match Conflicting match will be removed in favor of match Conflicting match will be removed in favor of match Conflicting match <264:(18, 21)+name=bonus+initiator=x264> will be removed in favor of match Rule was triggered: IdentitySet([, <264:(18, 21)+name=bonus+initiator=x264>, , ]) Running rule consequence: IdentitySet([, <264:(18, 21)+name=bonus+initiator=x264>, , ]) Checking rule condition: 6 independent rule(s) at priority 128. Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Rule was triggered: ([<5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>], [<5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>]) Running rule consequence: ([<5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>], [<5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>]) Checking rule condition: Checking rule condition: 19 independent rule(s) at priority 64. Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Rule was triggered: [, ] Running rule consequence: [, ] Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: 7 independent rule(s) at priority 64. Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: 6 independent rule(s) at priority 32. Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: 1 independent rule(s) at priority 16. Checking rule condition: 16 independent rule(s) at priority 0. Checking rule condition: Rule was triggered: ([], []) Running rule consequence: ([], []) Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Rule was triggered: Running rule consequence: Checking rule condition: Checking rule condition: Rule is disabled: Checking rule condition: Rule was triggered: ([], []) Running rule consequence: ([], []) Checking rule condition: Checking rule condition: 2 independent rule(s) at priority 0. Checking rule condition: Checking rule condition: 1 independent rule(s) at priority 0. Checking rule condition: Rule was triggered: ([], []) Running rule consequence: ([], []) 5 independent rule(s) at priority 0. Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: 2 independent rule(s) at priority 0. Checking rule condition: Checking rule condition: 1 independent rule(s) at priority 0. Checking rule condition: 9 independent rule(s) at priority -2048. Checking rule condition: Rule was triggered: [, , , , , , , , ] Running rule consequence: [, , , , , , , , ] Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Checking rule condition: Rule was triggered: [<7:(30, 32)+name=episode+tags=['SxxExx']+initiator=S05E07>, <5:(7, 9)+name=season+tags=['SxxExx']+initiator=S05>, , , , , <5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>, , , ] Running rule consequence: [<7:(30, 32)+name=episode+tags=['SxxExx']+initiator=S05E07>, <5:(7, 9)+name=season+tags=['SxxExx']+initiator=S05>, , , , , <5:(27, 29)+name=season+tags=['SxxExx']+initiator=S05E07>, , , ] 2 independent rule(s) at priority -2048. Checking rule condition: Rule was triggered: video/x-matroska Running rule consequence: video/x-matroska Checking rule condition: Rule was triggered: episode Running rule consequence: episode 1 independent rule(s) at priority -2048. Checking rule condition: GuessIt found: { "title": [ "X", "Men" ], "season": 5, "source": "DVD", "other": "Rip", "video_codec": "H.264", "release_group": "BTN", "episode": 7, "container": "mkv", "mimetype": "video/x-matroska", "type": "episode", "input_string": "X-Men.S05.DVDRip.x264-BTN/S05E07 - Old Soldiers.mkv" } ```