ZeroQI / Absolute-Series-Scanner

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

.scanner.xml instead of folder name tags #247

Closed arabcoders closed 4 years ago

arabcoders commented 4 years ago

Is your feature request related to a problem? Please describe. Feature request.

Describe the solution you'd like I would like the possibility using the tag system eg [anidb-] [tmd-] etc, in a file instead of folder na me, for example .scanner.xml/.ini.

Describe alternatives you've considered Additional context Currently for running show such as "My Hero Academia", the naming conviction is all over the place, anidb list them as seasons individually, thetvdb absolute order, groups release them as absolute numbering, i tried to come up with solution to fit my automated system i was able to make filebot pick the correct season, however by using tags in the folder name im unable to automate it filebot put the content in Anime Name/Name - EP - Title, as such new releases get new folder instead of going in original folder.

as such, is it possible to make ASS scanner work with hidden file for example could be ini/xml or whatever you think is best the content could be

.scanner.ini

[anidb]
id=1 
ZeroQI commented 4 years ago

You mean like a file in the series folder (anidb.id, anidb2.id, tvdb.id, tvdb2.id, tvdb3.id, ...) as already supported ?

You can specify the guid to use the following way:

  • In Series folder name by adding " [guid_type-id_number]" at the end (like "Oruchuban Ebichu [anidb-150]")
  • In "series_folder/guid_type.id" file with the id in it (ex: "Oruchuban Ebichu/anidb.id" file with "150" inside without double quotes)

Also in the readme

If you post anything on the scanner github or thread for any issue like poster missing/wrong, episode thumbnail/screenshot/title/summary missing/wrong, then you clearly haven't read this and need to pay the RTFM tax by donating (or you just find this the best anime scanner and/or agent, much apreciated average is 5 euros). Also applies if you want assistance but didn't follow troubleshooting steps or include logs...

Why do people create bug reports without reading the readme ??? Please consider donating

arabcoders commented 4 years ago

You mean like a file in the series folder (anidb.id, anidb2.id, tvdb.id, tvdb2.id, tvdb3.id, ...) as already supported ?

You can specify the guid to use the following way:

  • In Series folder name by adding " [guid_type-id_number]" at the end (like "Oruchuban Ebichu [anidb-150]")
  • In "series_folder/guid_type.id" file with the id in it (ex: "Oruchuban Ebichu/anidb.id" file with "150" inside without double quotes)

Also in the readme

If you post anything on the scanner github or thread for any issue like poster missing/wrong, episode thumbnail/screenshot/title/summary missing/wrong, then you clearly haven't read this and need to pay the RTFM tax by donating (or you just find this the best anime scanner and/or agent, much apreciated average is 5 euros). Also applies if you want assistance but didn't follow troubleshooting steps or include logs...

Why do people create bug reports without reading the readme ??? Please consider donating

I am sorry, i have been using your scanner for long time, i didn't realize you already made feature, and i indeed quickly scanned the README.md, but sadly i missed it.

My apologies.

ZeroQI commented 4 years ago

No problems, and thanks for the donation. If there is any issue with the force id file, let me know Line31 you have the file list: SOURCE_ID_FILES = ["anidb.id", "anidb2.id", "anidb3.id", "anidb4.id", "tvdb.id", "tvdb2.id", "tvdb3.id", "tvdb4.id", "tvdb5.id", "tmdb.id", "tsdb.id", "imdb.id", "youtube.id", "youtube2.id"] #

EndOfLine369 commented 4 years ago

FYI, for MHA S4 w/HorribleSubs, I personally use "[anidb3-14416-e-63]" as i don't want to rename anything. So I just have the scanner subtract 63 from ep num in the filename since they started S4 w/ ep num 64 and then shove it into plex under the right season with anidb3 (anidb2/3/4 would all do the same thing) to combine with the other three season 1-3 anidb3 entries from their own folders.

Boku no Hero Academia [anidb3-11739]
Boku no Hero Academia (2017) [anidb3-12233-e-13]
Boku no Hero Academia (2018) [anidb3-13485-e-38]
Boku no Hero Academia (2019) [anidb3-14416-e-63]
ZeroQI commented 4 years ago

That was the whole point of the scanner, rename the series but not the files. Didn't know anybody really used the negative offsets. not fan of anidb3, prefer anidb2

EndOfLine369 commented 4 years ago

That was the whole point of the scanner, rename the series but not the files.

Indeed 😃

Didn't know anybody really used the negative offsets.

Got 25 series using it

arabcoders commented 4 years ago

FYI, for MHA S4 w/HorribleSubs, I personally use "[anidb3-14416-e-63]" as i don't want to rename anything. So I just have the scanner subtract 63 from ep num in the filename since they started S4 w/ ep num 64 and then shove it into plex under the right season with anidb3 (anidb2/3/4 would all do the same thing) to combine with the other three season 1-3 anidb3 entries from their own folders.

Boku no Hero Academia [anidb3-11739]
Boku no Hero Academia (2017) [anidb3-12233-e-13]
Boku no Hero Academia (2018) [anidb3-13485-e-38]
Boku no Hero Academia (2019) [anidb3-14416-e-63]

That was the whole point of the scanner, rename the series but not the files. Didn't know anybody really used the negative offsets. not fan of anidb3, prefer anidb2

Thanks for the suggestion, i have quite elaborate setup going with automation, i just haven't been able to take time to actually implement a way to bypass filebot rename just yet.

nonetheless, i learned new thing with the subtract tag.

ZeroQI commented 4 years ago

you can remap even seasons -s02e13 and all the rest will be in sequence Quite some functionalities present i must say that exist nowhere else...

arabcoders commented 4 years ago

you can remap even seasons -s02e13 and all the rest will be in sequence Quite some functionalities present i must say that exist nowhere else...

indeed, if i may ask for 1 extra feature, the possibility of ignoring extra files, right now when i update the scanner i run my custom patch just to add .xattr folder to ignore dirs, if it possible to add it or have it be possible to be configured via ENV variables.

my scanner patch is

--- "Absolute Series Scanner.py"        2019-12-01 15:51:44.918238262 +0300
+++ "Absolute Series Scanner.new.py"    2019-12-01 15:53:19.023117146 +0300
@@ -56,6 +56,7 @@
   cic(r'^(?P<show>.*?)[ _\.]\[(?P<season>\d{1,2})\][ _\.]\[(?P<ep>\d{1,3})\][ _\.](?P<title>.*)$')]                                                                              #  3 # Serie [Sxx] [Exxx] title.ext
 DATE_RX         = [ #https://support.plex.tv/articles/200381053-naming-date-based-tv-shows/
                     cic(r'(?P<year>\d{4})\W+(?P<month>\d{2})\W+(?P<day>\d{2})(\D|$)'),   # 2009-02-10
+
                     cic(r'(?P<month>\d{2})\W+(?P<day>\d{2})\W+(?P<year>\d{4})(\D|$)')]       # 02-10-2009
 ANIDB_RX        = [                                                                                                                                                              ###### AniDB Specials episode offset regex array
                     cic(r'(^|(?P<show>.*?)[ _\.\-]+)(SP|SPECIAL)[ _\.]?(?P<ep>\d{1,2})(-(?P<ep2>\d{1,3}))?(V\d)?[ _\.]?(?P<title>.*)$'),                                         #  0 # 001-099 Specials
@@ -71,7 +72,7 @@

 # Uses re.match() so forces a '^'
 IGNORE_DIRS_RX_RAW  = [ '@Recycle', r'\.@__thumb', r'lost\+found', r'\.AppleDouble', r'\$Recycle.Bin', 'System Volume Information', 'Temporary Items', 'Network Trash Folder',   ###### Ignored folders
-                        '@eaDir', 'Extras', r'Samples?', 'bonus', r'.*bonus disc.*', r'trailers?', r'.*_UNPACK_.*', r'.*_FAILED_.*', r'_?Misc'] #, "VIDEO_TS"]                   #      source: Filters.py  removed '\..*',
+                        '@eaDir', '.xattr', 'Extras', r'Samples?', 'bonus', r'.*bonus disc.*', r'trailers?', r'.*_UNPACK_.*', r'.*_FAILED_.*', r'_?Misc'] #, "VIDEO_TS"]                   #      source: Filters.py  removed '\..*',
 IGNORE_DIRS_RX      = [cic(entry) for entry in IGNORE_DIRS_RX_RAW]
 # Uses re.match() so forces a '^'
 IGNORE_FILES_RX_RAW = [ r'[ _\.\-]?sample', r'-Recap\.', r'\._', 'OST', 'soundtrack']                                                                                            # Skipped files (samples, trailers)
ZeroQI commented 4 years ago

Had to do it from my phone, a pull request would have been easier for me. Not sure if that what you meant exactly though

arabcoders commented 4 years ago

Had to do it from my phone, a pull request would have been easier for me. Not sure if that what you meant exactly though

Yup, thank you. thats did it