Closed krbrs closed 3 years ago
Idolmaster Cinderella Girls Gekijou (2017).scanner.log confirm a scanner season number bug:
if rx in ANIDB_RX[:-2]: ### AniDB Specials ################################################################
season = 0 # offset = 100 for OP, 150 for ED, etc... #Log.info("ep: '%s', rx: '%s', file: '%s'" % (ep, rx, file))
Unsure why it fails...
answer [-2:]
Wrong correction, need to revert
Idolmaster Cinderella Girls Gekijou (2017).scanner.log confirm a scanner season number bug:
"Idolmaster Cinderella Girls Gekijou (2017)" s01e001 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S01_(1920x1080_H264)_[1F5E5753].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e002 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S02_(1920x1080_H264)_[BAF7B21D].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e003 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S03_(1920x1080_H264)_[1058DB38].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e004 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S04_(1920x1080_H264)_[90BF4A37].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e005 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S05_(1920x1080_H264)_[B4C913B1].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e006 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S06_(1920x1080_H264)_[043FE6E5].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e007 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S07_(1920x1080_H264)_[A264BDBA].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e008 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S08_(1920x1080_H264)_[236A88D4].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e009 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S09_(1920x1080_H264)_[29E9ADA5].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e010 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S10_(1920x1080_H264)_[D6F44DC7].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e011 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S11_(1920x1080_H264)_[81823E40].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e012 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S12_(1920x1080_H264)_[43B872C7].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)" s01e013 "ANIDB_RX-6" "" "[HorribleSubs]_Idolmaster_Cinderella_Girls_Gekijou_(2017)_-_S13_(1920x1080_H264)_[B301ED13].mkv"
"Idolmaster Cinderella Girls Gekijou (2017)[HorribleSubs]Idolmaster_Cinderella_Girls_Gekijou(2017)-S01(1920x1080_H264)[1F5E5753].mkv" shows as s01e01...
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
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(OP|NCOP|OPENING)[ _\.]?(?P<ep>\d{1,2}[a-z]?)?[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 1 # 100-149 Openings
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(ED|NCED|ENDING)[ _\.]?(?P<ep>\d{1,2}[a-z]?)?[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 2 # 150-199 Endings
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(TRAILER|PROMO|PV|T)[ _\.]?(?P<ep>\d{1,2})[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 3 # 200-299 Trailer, Promo with a number '(^|(?P<show>.*?)[ _\.\-]+)((?<=E)P|PARODY|PARODIES?) ?(?P<ep>\d{1,2})? ?(v2|v3|v4|v5)?(?P<title>.*)$', # 10 # 300-399 Parodies
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(O|OTHERS?)(?P<ep>\d{1,2})[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 4 # 400-499 Others
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(EP?[ _\.\-]?)?(?P<ep>\d{1,3})((-|-?EP?)(?P<ep2>\d{1,3})|)?[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 5 # E01 | E01-02| E01-E02 | E01E02 # __ # look behind: (?<=S) < position < look forward: (?!S)
cic(r'(^|(?P<show>.*?)[ _\.\-]+)SP?[ _\.]?(?P<ep>\d{1,2})[ _\.]?(?P<title>.*)$')] # 6 # 001-099 Specials #'S' moved to the end to make sure season strings are not caught in prev regex
0-4 are specials so season 0, Lines 1045-1046 do that for all but the last 2 regex 5 is multiple eps so season is kept and no need to translate ep range 6 is to detect season Sxx and that is the issue at hand
WS_SPECIALS = com(r"^((t|o)\d{1,3}$|(sp|special|op|ncop|opening|ed|nced|ending|trailer|promo|pv|others?)(\d{1,3})?$)")
That is the issue, there is coding for Sxx to detect seasons in filename, but that removes support for Sxx, but i cannot see a single use left of ANIDB_RX[-1] so it is useless...
Change lines 78-85 to:
ANIDB_RX = [ ###### AniDB Specials episode offset regex array
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(S|SP|SPECIAL)[ _\.]?(?P<ep>\d{1,2})(-(?P<ep2>\d{1,3}))?(V\d)?[ _\.]?(?P<title>.*)$'), # 0 # 001-099 Specials
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(OP|NCOP|OPENING)[ _\.]?(?P<ep>\d{1,2}[a-z]?)?[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 1 # 100-149 Openings
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(ED|NCED|ENDING)[ _\.]?(?P<ep>\d{1,2}[a-z]?)?[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 2 # 150-199 Endings
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(TRAILER|PROMO|PV|T)[ _\.]?(?P<ep>\d{1,2})[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 3 # 200-299 Trailer, Promo with a number '(^|(?P<show>.*?)[ _\.\-]+)((?<=E)P|PARODY|PARODIES?) ?(?P<ep>\d{1,2})? ?(v2|v3|v4|v5)?(?P<title>.*)$', # 10 # 300-399 Parodies
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(O|OTHERS?)(?P<ep>\d{1,2})[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$'), # 4 # 400-499 Others
cic(r'(^|(?P<show>.*?)[ _\.\-]+)(EP?[ _\.\-]?)?(?P<ep>\d{1,3})((-|-?EP?)(?P<ep2>\d{1,3})|)?[ _\.]?(V\d)?([ _\.\-]+(?P<title>.*))?$') # 5 # E01 | E01-02| E01-E02 | E01E02 # __ # look behind: (?<=S) < position < look forward: (?!S)
line 1034 to:
elif rx in ANIDB_RX[]:
Line 1045 to:
if rx in ANIDB_RX[:-1]:
Please test and report, and will include changes to the master code.
I tried your suggested changes. After replacing the code with the above, ASS doesn't scan episodes anymore, the library stays empty. After reverting the changes the outcome is the same as before. ASS does not generate any scanner-logfiles. Plex Log generates: "Unknown metadata type: folder"
edit: I think I found a closing ] bracket missing at the end of the last line but it still doesn't change the above
actually if it crashed then code is corrected, it shouldn't run agaiin for that folder unless the content changes, making coding hell for a scanner code...
Ok, I did another test. I reinserted your changes including the missing bracket, created a new library and tried scanning with the same result. No Logs are created etc. :( Reverting the changes, the library scans fine and creates Logfiles etc.
correction line 1034 to:elif rx in ANIDB_RX:
, i wrote '[]' before and that was wrong
This looks good now - after fixing line 1034 both are now correctly recognized:
Idolmaster Cinderella Girls Gekijou (2017) [anidb-13274].filelist.log Idolmaster Cinderella Girls Gekijou (2017) [anidb-13274].scanner.log Memories Off #5 Togireta Film [anidb-4139].filelist.log Memories Off #5 Togireta Film [anidb-4139].scanner.log
Thank you :)
Platform
Operating system and version: Windows 10, current branch Plex version: 1.21.3.4021
Expected Behavior
Idolmaster Cinderella Girls Gekijou (2017), (2018), Idolmaster Cinderella Girls (2015) specials should be matched as special episodes
Current Behavior
Idolmaster Cinderella Girls Gekijou (2017), (2018), Idolmaster Cinderella Girls (2015) specials are matched as regular episodes
Steps to Reproduce
Logs and Screenshot of the outcome attached:
Idolmaster Cinderella Girls Gekijou (2017).filelist.log
Idolmaster Cinderella Girls Gekijou (2017).scanner.log
Additional information
The folder scheme for all anime is: Drive:\anime_name-folder\filename I use Shoko for organizing and Naming.
Thank you for your help!