You can merge them manually by ctrl clicking on the series and clicking on the 3 dots on the left and selecting merge.
@Munchkin_ Thx I’ve never done that before, only split. Didn’t know that was possible.
@Munchkin_ : well neither did i and i wrote the agent, good tip. Thanks for the donation, much appreciated’. Trying to catch-up now on bug reports
Very good install description, i updated the read-me to point to the wiki install page which i updated: https://github.com/ZeroQI/Hama.bundle/wiki/Installing-Hama-and-ASS-on-Ubuntu
I updated the readme for the issue you had to include the error message, so it helps people with same issue to identify it more easily
@deusxanime I did love the grouping folders despite so many user oblivious to it, BUT it was a hack, and plex couldn’t cache the scan, redoing it everytime and it corrupted multiple time plex database… i thought the minor inconvenient of adding back grouping folders as root folder was ok and made the code so much simpler… Also, if you had a subfolder with tons of ■■■■ like a download folder, it is skipped and the library looks neater…
root folders:
- /mnt/videos/anime
- /mnt/videos/anime/Another
“Another” folder contain:
- /mnt/videos/anime/Another/[2012-01-10] Another [anidb2-8556]
- /mnt/videos/anime/Another/[2012-05-26] Another - The Other - Inga [anidb2-8625]
It should not pick the special if “/mnt/videos/anime/Another” is not added as root folder; logs show correct behaviour
Another [tvdb-254349] force tvdb numbering and special 2 is " Live-action film" for thetvdb, working as designed. it only exist as a special in anidb and mapping file doesn’t map it so s00e02 anidb gets mapped to s00e02 tvdb
- http://thetvdb.com/?tab=season&seriesid=254349&seasonid=480378&lid=7
- ScudLee mapping anime anidbid=“8556” tvdbid=“254349” defaulttvdbseason=“1” episodeoffset="" tmdbid="" imdbid=""
Well my scanner put it as s01e01 so plex issue, confirmed by cloning behaviour
2016-11-18 14:50:23,251 - ASS : INFO - “[2012-01-10] Another [tvdb-254349]” s0001e001 “Another - Ep 01 (BD 1280x720, JPN+ENG) [CBM] [35ED63AE].mkv” “(, Jpn+Eng)”
Anidb 2 work well for Strike Witches in logs.
The thing is, if you scan the files, plex knows them and reuse the info so you need to do the plex dance each time you change something. It was driving me mad when developping the scanner as if the folder doesn’t change, it didn’t rescan the file, therefore not executing the code i changed… So sorry, but working as designed according to edit 3…
@ZeroQI Well I felt I should give back, this scanner and agent made life so much easier.
Also running
sudo chown -R plex:plex /var/lib/plexmediaserver sudo chmod 775 -R /var/lib/plexmediaserver
will take much longer as it will go into the video preview thumbnails and change those as well and that could/will take hours.
Here is an updated install and updating copy paste this should be run as root or logging in as a sudo user. Requires git (apt-get install git) to be installed. http://pastebin.com/wnwVS7BS
@Munchkin_ : updated https://github.com/ZeroQI/Hama.bundle/wiki/Installing-Hama-and-ASS-on-Ubuntu . If i am correct you can create and update wiki pages if needed
updated scanner and agent today, should work ok now, please report any issues
@ZeroQI thx for the clarification. I know there is a lot to deal with when you are pulling from both AniDB and TVDB and some stuff just won’t resolve between the two. Just wanted to be sure before I undertook the task of renaming things. I might go the route of, for series with many seasons, just use the tvdb-xxxx tag and “Season 1/2/3” + “Specials” folder. This is the way all my regular TV shows are anyway, so nothing new just need to convert some anime over to that as well. It is nice being able to mix and match between that and regular anidb style though at the same time, so much appreciated!
When using tvdb-xxxx, do you need to name in “normal” tvdb style like s00e01 or 1x01? Or can you keep the normal “Ep 01” style numbering that anime usually has?
So at first I thought you meant that Specials are not mapped at all in the ScudLee file, but after looking at it I realized they ARE in there (and the one I had trouble with from Another was just not in there; I’ve asked in the kodi forum thread to have it added). So given that, I started playing with anidb2-xxxx style tagging/sorting. I started with Sword Art Online to give it a try and it looks like it is not pulling/interpreting the mappings right for at least SAO II specials.
Here’s what is in ScudLee for the 3 SAO series (S1, Extra Edition, S2):
<anime anidbid="8692" tvdbid="259640" defaulttvdbseason="1">
<name>Sword Art Online</name>
<mapping-list>
<mapping anidbseason="0" tvdbseason="0">;10-0;11-0;12-0;</mapping>
</mapping-list>
</anime>
...
<anime anidbid="10022" tvdbid="259640" defaulttvdbseason="0">
<name>Sword Art Online: Extra Edition</name>
<mapping-list>
<mapping anidbseason="0" tvdbseason="0">;1-11;</mapping>
<mapping anidbseason="1" tvdbseason="0">;1-10;</mapping>
</mapping-list>
</anime>
...
<anime anidbid="10376" tvdbid="259640" defaulttvdbseason="2">
<name>Sword Art Online II</name>
<mapping-list>
<mapping anidbseason="0" tvdbseason="0" start="1" end="10" offset="11"/>
</mapping-list>
</anime>
I added my “Sword Art Online” as a root folder in my Anime library with [anidb2-xxxx] tagging on the folders, and it worked except SAO II specials looks like they didn’t get the offset correctly, so I have 2 of each listed in Plex for Specials season episodes s0e01 - s0e10.
I’ll attach filelist and scanner log as well. Is something in the naming messing it up, or is ASS not picking up the offset correctly from ScudLee xml?
edit: Sorry not sure at what point this turns from an ASS issue into a HAMA issue, always been fuzzy on that…
@deusxanime i believe i spotted the issue thanks to your logs
https://raw.githubusercontent.com/ScudLee/anime-lists/master/anime-list-master.xml
<anime anidbid="10376" tvdbid="259640" defaulttvdbseason="2">
<name>Sword Art Online II</name>
<mapping-list>
<mapping anidbseason="0" tvdbseason="0" start="1" end="10" offset="11"/>
</mapping-list>
</anime>
“ERROR - anidbTvdbMapping() - mappingList creation exception” in logs… it crashes for some reason
for anime in AniDB_TVDB_mapping_tree.iter('anime') if AniDB_TVDB_mapping_tree else []:
try: ### mapping list ###
for season in anime.iter('mapping') if anime else []:
if anime.get("offset"): mappingList[ 's'+season.get("tvdbseason")] = [anime.get("start"), anime.get("end"), anime.get("offset")]
for string2 in filter(None, season.text.split(';')): mappingList [ 's' + season.get("anidbseason") + 'e' + string2.split('-')[0] ] = 's' + season.get("tvdbseason") + 'e' + string2.split('-')[1]
except: Log.error("anidbTvdbMapping() - mappingList creation exception")
Please try https://github.com/ZeroQI/Absolute-Series-Scanner/blob/9336ee0bd305d2f31cd5b431a57fbb009f9850b5/Scanners/Series/Absolute%20Series%20Scanner.py and if working will pull into the main branch.
Before: if anime.get(“offset”): mappingList[ ‘s’+season.get(“tvdbseason”)] = [anime.get(“start”), anime.get(“end”), anime.get(“offset”)]
After: if season.get(“offset”): mappingList[ ‘s’+season.get(“tvdbseason”)] = [season.get(“start”), season.get(“end”), season.get(“offset”)]
Never checked the code since ScudLee did the changed some time ago and implemented, knew the rules but hardly any data to test at that point…
OK I do see the exception in the scanner log, in fact there are 2, one for the main series of SAO Season 2 and one for its specials. The main episodes for SAO Season 2 were not noticeable since there was no offset for them anyway, but they did get the same error. The specials were obviously noticeable because they were supposed to be offset by 11.
I’ll create a new test library and add SAO in again and rerun it. Is that what you wanted me to do? Not sure what you meant by “output the text in this code”. Did you mean comment out/remove? Also is it ok to just create a “testing” library but leave my existing one out there? Already have some series in there and have make alterations to them, so don’t want to blow my existing “main” one away unless I have to.
… intermission …
So I created a new “anime-test” library and added just the SAO folder as a source and selected ASS/HAMA as the scanner/agent. At this point I haven’t altered ASS or HAMA, just retrying it with same code. This time it created the SAO series and again mapped the SAO Season 2 specials without the offset so they show up as s00e01-e10 in Plex, same as before so no surprises there. But for some reason this time the SAO Season 1 specials are just completely missing and not sure why… extra confused
I renamed the logs so they would be fresh for this run and will attach them.
@deusxanime : Let’s make it simple: use alternate library for tests, that’s clever. Please replace the ASS code with this new code (you can call it v2) that supposedly fixes the issue and should no longer have the exception, and edit your library to use this second copy of the ASS scanner
https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/9336ee0bd305d2f31cd5b431a57fbb009f9850b5/Scanners/Series/Absolute%20Series%20Scanner.py
Let me know if it fixes it by attaching the logs like you just did
@ZeroQI - I copied the new linked scanner code into a “Absolute Series Scanner v2.py” file in the series scanner location (same as the other), restarted Plex to be sure it was picked up (not sure if that is necessary), and then created a new test library using ASS v2/HAMA and put SAO in again as root folder. Seems to still get the mapping exceptions though from what I’m seeing in the logs and is thus not applying the offset to SAO Season 2 specials and so in Plex they are showing up as duplicates to s0e01-10.
Attaching logs from new scan.
@deusxanime : better, yes it gives an exception but now i see the mapping list
2016-11-22 10:43:04,318 - ASS : DEBUG - mappingList: {‘s0’: [‘1’, ‘10’, ‘11’], ‘episodeoffset’: ‘’}
It look like i wasn’t using the season offset, only the global one
Please replace your v2 scanner with the below update and that should now work
https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/7a3fdc538dfee6ff50d247f20b4a091515b03fdc/Scanners/Series/Absolute%20Series%20Scanner.py
@ZeroQI - Looking good! I updated the scanner code, deleted the “anime test” library, and recreated it with SAO again. Looks like all the specials mapped correctly now and SAO Season 2 specials are being offset properly!
In case you wanted to look at anything or verify, here is the scanner logs. (forgot to del them before running, so not quite fresh/clean but I’m sure you’ll be able to see where the scanning with the updated scanner happens, just a few minutes ago just after 14:00 I think.)
Just took a peek and I do still see the exception errors though too and mappingList with empty offset, which is odd?? That just artifact of old code that needs to be cleaned up?
$ cat “Plex Media Scanner (custom ASS).log” | grep mapping | grep “2016-11-22 14:”
2016-11-22 14:02:40,577 - ASS : ERROR - anidbTvdbMapping() - mappingList creation exception
2016-11-22 14:02:40,578 - ASS : DEBUG - mappingList: {‘s0’: [‘1’, ‘10’, ‘11’], ‘episodeoffset’: ‘’}
2016-11-22 14:02:43,850 - ASS : ERROR - anidbTvdbMapping() - mappingList creation exception
2016-11-22 14:02:43,851 - ASS : DEBUG - mappingList: {‘s0’: [‘1’, ‘10’, ‘11’], ‘episodeoffset’: ‘’}
2016-11-22 14:02:44,688 - ASS : DEBUG - mappingList: {‘s1e1’: ‘s0e10’, ‘s0e1’: ‘s0e11’, ‘episodeoffset’: ‘’}
2016-11-22 14:02:45,129 - ASS : DEBUG - mappingList: {‘s1e1’: ‘s0e10’, ‘s0e1’: ‘s0e11’, ‘episodeoffset’: ‘’}
2016-11-22 14:02:45,556 - ASS : DEBUG - mappingList: {‘s0e10’: ‘s0e0’, ‘s0e11’: ‘s0e0’, ‘s0e12’: ‘s0e0’, ‘episodeoffset’: ‘’}
2016-11-22 14:02:47,161 - ASS : DEBUG - mappingList: {‘s0e10’: ‘s0e0’, ‘s0e11’: ‘s0e0’, ‘s0e12’: ‘s0e0’, ‘episodeoffset’: ‘’}
@deusxanime : Excellent news. That fixed the season mappings offset (“mapping” tag) for ScudLee’s mapping file, would have impacted all series with offset in season line, but the “episodeoffset” (anime tag) was working, that’s the one you see displayed empty, so displayed as expected.
@deusxanime : There is something in my code that crash but after mapping is done ok, multiple mapping may only list the first, i have to check and make it not crash on the xml. I have rewrote the function and outputs way more now on error, and added a check that should fix this, could you run on your test library and attach logs again ? Thanks for the logs and tests, that is the very workings algorythms linked to the mapping file so it impacts everything with mappings, so if we remove all bugs, every episodes will map properly, and i can push the code to the master branch
@ZeroQI - I loaded the new code into my v2 scanner, deleted library and logs to clear them out, and then went to recreate it. Unfortunately something happened though I think that broke it. The library is showing up empty and no scanner or filelist log is being generated. =/ Not sure where else to check to see why it isn’t working. I did go in to the scanner v2 file and verify I had copy-pasted correctly, and the beginning and end few lines match what is on the github link.
edit: Just a quick update to say that I did go back to my old/main “Anime” library that is still running the original ASS (not v2) and had it do a scan. As soon as I did both the SAO and main ASS logs were created from running that scan, so definitely seems something with the latest update to the v2 code and not something on my system.
@deusxanime didn’t like the for inline dunno why
for string2 in season.text.split(’;’):
mappingList[ ‘s’+season.get(“anidbseason”) + ‘e’ + string2.split(’-’)[0] ] = ‘s’ + season.get(“tvdbseason”) + ‘e’ + string2.split(’-’)[1]
please try: https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/ZeroQI-patch-1/Scanners/Series/Absolute%20Series%20Scanner.py
@ZeroQI - This time it did create the library and proper logs. I’ll attach them here.
It looks like something is still not quite right though because the “Extra Edition” episode and special mapping isn’t correct now and just dropped them as s0e01.
@deusxanime : passed all day on it. no more errors reported and works
https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/0a0ff585c1f8af57a38c5c41e8a839f81fc53179/Scanners/Series/Absolute%20Series%20Scanner.py
Please confirm it works and will merge in master code
@ZeroQI - Initially it came up as 2 separate entries, but unmatch and rematching caused them to merge properly into a single SAO entry. Unfortunately looks like the specials are mapping all wonky now. The SAO season 1 specials seem to just have gotten lost and the season 2 specials mapped to s0e01+ rather than higher up.
@deusxanime : getting there, forgot the line to apply offsets, was to focussed on getting it not to crash
https://raw.githubusercontent.com/ZeroQI/Absolute-Series-Scanner/bc8b0996e1cb566c799845e7893f7d18264550bb/Scanners/Series/Absolute%20Series%20Scanner.py




