ZeroQI / Absolute-Series-Scanner

Seasons, absolute mode, Subfolders...
1.01k stars 155 forks source link

Name 2 E01 = E02 #220

Closed DaniGTA closed 5 years ago

DaniGTA commented 5 years ago

The name

Name 2 E01

Get detected as E02

ZeroQI commented 5 years ago

If series folder is called "Name 2" it would scrub it so bad naming. No AniDB nor TheTVDB series names "name 2"... No logs so ticket closure

DaniGTA commented 5 years ago

Folder system:

The series get detected fine. But all episodes in season 2 get detected as Name S02E02

ZeroQI commented 5 years ago

And no logs.... Please include scanner logs from Hama agent data folders logs/Library name/Name.agent. logs

DaniGTA commented 5 years ago

Error is at: "FileName" s02e002 "Word Search" "E09" "FileName 2 E09.mkv"

FileName.scanner.log

=============================================================================================================================================================
Library: 'no valid X-Plex-Token.id', root: 'removed', path: 'FileName\S02', files: '14', dirs: '0'
Plex scan start: 2019-06-19 19:42:50,479000
=============================================================================================================================================================
No forced id found in series folder name nor id file
-------------------------------------------------------------------------------------------------------------------------------------------------------------
misc_count: {'s02e08': 1, '03': 1, '06': 1, '02v2': 1, '04': 1, 'e09': 1, '01v2': 1, '08': 1, '05': 1, 's02e05': 1, 's02e06': 1, '2': 1, 's02e10': 1, 's00e08': 1, '07': 1}
misc_words: []
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"FileName" s02e001                         "Word Search" "" "FileName (2019) - 01v2.mkv"
"FileName" s02e002                         "Word Search" "" "FileName (2019) - 02v2.mkv"
"FileName" s02e002                         "Word Search" "E09" "FileName 2 E09.mkv"
"FileName" s02e003                         "Word Search" "" "FileName (2019) - 03.mkv"
"FileName" s02e004                         "Word Search" "" "FileName (2019) - 04.mkv"
"FileName" s02e005                         "Word Search" "" "FileName (2019) - 05.mkv"
"FileName" s02e006                         "Word Search" "" "FileName (2019) - 06.mkv"
"FileName" s02e007                         "Word Search" "" "FileName (2019) - 07.mkv"
"FileName" s02e008                         "Word Search" "" "FileName (2019) - 08.mkv"
"FileName" s00e008                         "SERIES_RX-1" "" "FileName S00E08.mkv"
"FileName" s02e005                         "Word Search" "" "FileName S02E05.mkv"
"FileName" s02e006                         "Word Search" "" "FileName S02E06.mkv"
"FileName" s02e008                         "Word Search" "" "FileName S02E08.mkv"
"FileName" s02e010                         "Word Search" "" "FileName S02E10.mkv"
=============================================================================================================================================================
ZeroQI commented 5 years ago

That's the one! The scanner use word search from the left so encounter the '2' first. It also removes the title in case it has numbers. It also check the number of occurences. There isn't too many 2s so it does not skip it... One or two with the same naming convention and it would have skipped the 2... If failing it then uses REGex..

It is badly named and if i chose to put regex first it would fix but potentially impact many...

I see your point but how can it know to skip the 2?

DaniGTA commented 5 years ago

Seach for \sE\d{1,}|\sEP\d{1,} if found take that as episode number if not found just go on with the current stuff.

I dont think there will be a series that match this: \s{1,}E\d{1,}

ZeroQI commented 5 years ago

So i can keep word search first but for exx or epxx i bypass with '\sEP?\d{1,}'? That bothers me a bit but is doable...

DaniGTA commented 5 years ago

You can make the EP scan first if the files from the users are mostly covered with ep that should keep the scan fast. But if less user mark they files with ep then it should go with word search first.

purposelycryptic commented 5 years ago

If series folder is called "Name 2" it would scrub it so bad naming. No AniDB nor TheTVDB series names "name 2"...

And thank God for that - I've been using AniList lately for scrobbling, and, rather than the AniDB-style SeriesName (2019), etc, all sequels are named SeriesName 2, SeriesName 3, etc, which makes series/ep identification incredibly painful... Esp since Trackma, the scrobbler I use, supports as wide a net of naming formats as possible, so SeriesName 2 is valid for it as both SeriesName, episode 2 and SeriesName 2, episodeNum following. So many regex checks...

Sorry, it's 2:30am, sick, can't sleep, and saw this topic in my email updates and had PTSD flashbacks... And it's all still waiting for me when I can get out of bed again...

EndOfLine369 commented 5 years ago

@ZeroQI, I do not believe this should be tried to be allowed. In the above example, if the folder was 'FileName 2' or if a decent amount of files had '2' in the filename (misc_count hit) it would be fine. This a clear example of where the single filename should just be fixed.

ZeroQI commented 5 years ago

Notes

This could have far-reaching implications/bugs and potentially impact supported filename conventions...

I am going to close this as we do support this already but with only one off bad named filename the algorythm i wrote cannot detect it, It needs renaming in this instance