ZeroQI / Absolute-Series-Scanner

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

Support for numbers on series name when not using series and season folders #214

Closed TieSKey closed 5 years ago

TieSKey commented 5 years ago

If a series without its own folder ends with a number, the scanner will confuse that number as the episode number and group all files under that one episode.

Using latest version cloned directly from here.

Random example took from anidb: Space Dandy 2

Logs for file names including "s01" and episode title

=============================================================================================================================================================
Library: 'TV Shows', root: 'W:\Test', path: '', files: '2', dirs: '0'
Plex scan start: 2019-05-09 18:32:14,131000
=============================================================================================================================================================
"Space Dandy" s01e002                         "Word Search" "s01e01 - Some Title" "Space Dandy 2 - s01e01 - Some Title.mkv"
"Space Dandy" s01e002                         "Word Search" "s01e02 - Another Title" "Space Dandy 2 - s01e02 - Another Title.mkv"
root level manual call to Grouping folders
=============================================================================================================================================================
Plex scan end: 2019-05-09 18:32:14,133000
=============================================================================================================================================================
Library: 'TV Shows', root: 'W:\Test', path: '', files: '2', dirs: '0'
Plex scan start: 2019-05-09 18:32:14,129000
plexignore_files: '[]', plexignore_dirs: '[]'
=============================================================================================================================================================
[file] Space Dandy 2 - s01e01 - Some Title.mkv
[file] Space Dandy 2 - s01e02 - Another Title.mkv
=============================================================================================================================================================
Plex scan end: 2019-05-09 18:32:14,130000

Logs for files with only "exx"

=============================================================================================================================================================
Library: 'TV Shows', root: 'W:\Test', path: '', files: '2', dirs: '0'
Plex scan start: 2019-05-09 18:28:28,966000
=============================================================================================================================================================
"Space Dandy" s01e002                         "Word Search" "E01" "Space Dandy 2 - e01.mkv"
"Space Dandy" s01e002                         "Word Search" "E02" "Space Dandy 2 - e02.mkv"
root level manual call to Grouping folders
=============================================================================================================================================================
Plex scan end: 2019-05-09 18:28:28,968000
=============================================================================================================================================================
Library: 'TV Shows', root: 'W:\Test', path: '', files: '2', dirs: '0'
Plex scan start: 2019-05-09 18:28:28,965000
plexignore_files: '[]', plexignore_dirs: '[]'
=============================================================================================================================================================
[file] Space Dandy 2 - e01.mkv
[file] Space Dandy 2 - e02.mkv
=============================================================================================================================================================
Plex scan end: 2019-05-09 18:28:28,965000

Any chance to support this? I'd rather not use extra folders since most of the stuff I have is just 1 or 2 episodes to check if worth watching. I don't think it should be a lot of trouble to fix when already having the " - Exxx" or " - SxxExxx" in the filename.

ZeroQI commented 5 years ago

Skipping word search for root folder (path=="" or not path) needs testing, it is my own algorithm and take precedence over regex, it does skip in case of doubts to revert on regex

Line 892 try to replace "for word in words:" with "for word in words if path else []:" If it solved will add to the scanner as there is no point in word search for root folders too much

TieSKey commented 5 years ago

Seems to be working for this use case perfectly now!

ZeroQI commented 5 years ago

Thanks for the suggestion and testing, i had no time to test so would not have happened otherwise.