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/6] 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/6] 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/6] 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) From dd7d597fa796d0190ffc2eb90e259faf5f0c3cca Mon Sep 17 00:00:00 2001 From: PDA-1 <143747053+PDA-1@users.noreply.github.com> Date: Sat, 20 Sep 2025 09:36:37 +0200 Subject: [PATCH 4/6] Added test case for "AV1" --- testdata.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testdata.json b/testdata.json index c385412..ee31e71 100644 --- a/testdata.json +++ b/testdata.json @@ -148,6 +148,12 @@ "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": "series-10", + "INPUTFILE": "Real.Time.with.Bill.Maher.S23E27.1080p.AV1.10bit-MeGusta/Real.Time.with.Bill.Maher.S23E27.1080p.AV1.10bit-MeGusta.mkv", + "OUTPUTFILE": "/series/Mkv/Real Time With Bill Maher/Season 23/Real Time With Bill Maher - S23E27 - 1080p.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", @@ -219,3 +225,4 @@ "NZBPO_EPISODESEPARATOR": "-E" } ] + From bc9bed3efbea44e941464c9b9f69bb1a287765fd Mon Sep 17 00:00:00 2001 From: PDA-1 <143747053+PDA-1@users.noreply.github.com> Date: Sat, 20 Sep 2025 09:37:54 +0200 Subject: [PATCH 5/6] Fix: Added support for AV1 in filename --- lib/guessit/config/options.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/guessit/config/options.json b/lib/guessit/config/options.json index 39cd8fc..4ae3938 100644 --- a/lib/guessit/config/options.json +++ b/lib/guessit/config/options.json @@ -169,6 +169,7 @@ "3gp2", "asf", "avi", + "av1", "divx", "flv", "iso", From 64618b897df2f48034c8887e6d8fc9fb8b0557db Mon Sep 17 00:00:00 2001 From: PDA-1 <143747053+PDA-1@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:15:34 +0200 Subject: [PATCH 6/6] Added AV1 support (guessit patch 2) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 58adb02..3187f93 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,8 @@ Credits The script relies on python libraries: - [GuessIt 3.8.0](http://guessit.readthedocs.org) to extract information from file names and includes portions of code from [SABnzbd](https://sabnzbd.org/). - - [Patch 1](https://github.com/guessit-io/guessit/pull/799/commits/91b52758b24dac4944f21b5a04de830dd861689e) by [PDA-1](https://github.com/PDA-1) Added support for Channel 5 streaming service (My5) + - [Patch 1](https://github.com/nzbgetcom/Extension-VideoSort/pull/14) by [PDA-1](https://github.com/PDA-1) Added support for Channel 5 streaming service (My5) + - [Patch 2](https://github.com/nzbgetcom/Extension-VideoSort/pull/19) added support for A1 format by [PDA-1](https://github.com/PDA-1) - [BabelFish 0.6.0](https://github.com/Diaoul/babelfish) - [ReBulk 3.2.0](https://github.com/Toilal/rebulk/) - [dateutil 2.8.2](https://github.com/dateutil/dateutil)