From d0b07af24631c08ae1d0021f3582569c65119ea9 Mon Sep 17 00:00:00 2001 From: PDA-1 <143747053+PDA-1@users.noreply.github.com> Date: Fri, 25 Jul 2025 21:03:37 +0200 Subject: [PATCH 1/3] added workaround for titles with 2 numbers with a dash betwwen them added workaround for titles with 2 numbers with a dash betwwen them (which guessit has problems with) --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 30bd110..ca96472 100644 --- a/main.py +++ b/main.py @@ -957,7 +957,7 @@ def guess_info(filename): guess = guessit.api.guessit( unicode(guessfilename), {"allowed_languages": [], "allowed_countries": []} ) - + if verbose: print(guess) @@ -969,6 +969,10 @@ def guess_info(filename): if verbose: print("use filename as title for recovery") + # workaround for titles with 2 numbers with a dash betwwen them (which guessit has problems with) + if isinstance(guess["title"], list): + guess["title"] = ' '.join(guess["title"]) + # fix some strange guessit guessing: # if guessit doesn't find a year in the file name it thinks it is episode, # but we prefer it to be handled as movie instead From 583f140ffc87a40622221952e15aed3b76342bf8 Mon Sep 17 00:00:00 2001 From: PDA-1 Date: Sat, 26 Jul 2025 09:11:31 +0200 Subject: [PATCH 2/3] workaround for titles with 2 numbers with a dash between them workaround for titles with 2 numbers with a dash between them (which guessit has problems with) --- main.py | 4 ++-- testdata.json | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ca96472..6c025f0 100644 --- a/main.py +++ b/main.py @@ -969,8 +969,8 @@ def guess_info(filename): if verbose: print("use filename as title for recovery") - # workaround for titles with 2 numbers with a dash betwwen them (which guessit has problems with) - if isinstance(guess["title"], list): + # workaround for titles with 2 numbers with a dash between them (which guessit has problems with) + if "title" in guess and isinstance(guess["title"], list): guess["title"] = ' '.join(guess["title"]) # fix some strange guessit guessing: diff --git a/testdata.json b/testdata.json index 460f5e7..c385412 100644 --- a/testdata.json +++ b/testdata.json @@ -142,6 +142,12 @@ "OUTPUTFILE": "/series/Mkv/Motorway Cops Catching Britains Speeders/Season 7/Motorway_Cops_Catching_Britains_Speeders - S07E05 - 1080p.Web.mkv", "NZBPO_SERIESFORMAT": "%Ext/%sn %y/Season %s/- %s_n - S%0sE%0e - %en - %qss.%qf.%ext" }, + { + "id": "series-9", + "INPUTFILE": "Airport.24-7.S01E08.1080p.Webrip.x264.AAC2.0-MasterCylinder/Airport.24-7.S01E08.1080p.Webrip.x264.AAC2.0-MasterCylinder.mkv", + "OUTPUTFILE": "/series/Mkv/Airport 24 7/Season 1/Airport 24 7 - S01E08 - 1080p.Web.mkv", + "NZBPO_SERIESFORMAT": "%Ext/%sn %y/Season %s/- %sn - S%0sE%0e - %en - %qss.%qf.%ext" + }, { "id": "dated-deprecated-t-1", "INPUTFILE": "The.Daily.Show.2013.06.27.Tom.Goldstein.HDTV.x264-FQM.mkv", From 6d6eb8dc9b7d6e7e48d6d56534850474b1eae7b5 Mon Sep 17 00:00:00 2001 From: PDA-1 <143747053+PDA-1@users.noreply.github.com> Date: Mon, 28 Jul 2025 09:21:29 +0200 Subject: [PATCH 3/3] added workaround for titles with 2 numbers with a dash between them added workaround for titles with 2 numbers with a dash between them (which guessit has problems with) --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 6c025f0..6707af1 100644 --- a/main.py +++ b/main.py @@ -957,7 +957,7 @@ def guess_info(filename): guess = guessit.api.guessit( unicode(guessfilename), {"allowed_languages": [], "allowed_countries": []} ) - + if verbose: print(guess)