Absolute Series Scanner (for anime mainly)

@ZeroQI - Updated ASS/HAMA to latest github masters.

  1. Titles/metadata now downloading for “Black Jack (2004)”
  2. As you said, still working even with “4” in the name
  3. Now recognizing the ED as separate for “Clamp in Wonderland”, and as s0e151/Ending
  4. Code Geass specials now working correctly and not doubling up

Your awesome, getting them all fixed already! Will continue working on library and report any new bugs I run into. Thanks!!

@deusxanime the thing is it fixes this for everybody for all series, and you document properly the issues so i really appreciate your assistance. I thought the scanner wouldn’t be popular and was a pain to develop due to no documentation but coming along nicely ;D

For some reason Gurren Lagann Parallel Works 1 & 2 are both just being completely dropped.

Here is the scanner log where you can see it says there are files, but nothing shows up after.

Scanner call - root: '/mnt/videos/anime', path: 'Gurren Lagann Parallel Works [anidb2-6082]', dirs: '0', files: '2'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Use existing: '/tmp/anime-list-corrections.xml'
anidbTvdbMapping() - No valid tvbdbid: '293088' found for anidbid '6082'
Use existing: '/tmp/ASS-tmp-anime-list-master.xml'
anidbTvdbMapping() - anidb: '6082', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works', mappingList: '{'s1e3': 's0e8', 's1e2': 's0e7', 's1e1': 's0e6', 's1e7': 's0e12', 's1e6': 's0e11', 's1e5': 's0e10', 's1e4': 's0e9', 's1e8': 's0e13', 's0e1': 's0e0', 'episodeoffset': ''}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Scanner call - root: '/mnt/videos/anime', path: 'Gurren Lagann Parallel Works 2 [anidb2-7485]', dirs: '1', files: '1'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"/mnt/videos/anime/Gurren Lagann Parallel Works 2 [anidb2-7485]/extras" match IGNORE_DIRS_RX: "Extras"
Use existing: '/tmp/anime-list-corrections.xml'
anidbTvdbMapping() - No valid tvbdbid: '293088' found for anidbid '7485'
Use existing: '/tmp/ASS-tmp-anime-list-master.xml'
anidbTvdbMapping() - anidb: '7485', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works 2', mappingList: '{'s1e3': 's0e16', 's1e2': 's0e15', 's1e1': 's0e14', 's1e7': 's0e20', 's1e6': 's0e19', 's1e5': 's0e18', 's1e4': 's0e17', 'episodeoffset': ''}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Scanner call - root: '/mnt/videos/anime', path: 'Gurren Lagann Parallel Works 2 [anidb2-7485]/extras', dirs: '0', files: '1'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Grouping folder: 'Gurren Lagann Parallel Works 2 [anidb2-7485]/extras' skipped, need to be added as root folder if needed
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Here are the relevant files/folder from the filelist so you see how they are named

Gurren Lagann Parallel Works [anidb2-6082]/Gurren Lagann Parallel Works - Ep 01-06 [+Ep 08] (BD 1280x720) [RUELL-Next] [0D2ED2CD].mkv
Gurren Lagann Parallel Works [anidb2-6082]/Gurren Lagann Parallel Works - Ep 07 (BD 1280x720) [RUELL-Next] [D163D7D6].mkv
Gurren Lagann Parallel Works 2 [anidb2-7485]/Gurren Lagann Parallel Works 2 - Ep 01-07 (BD 1280x720) [RUELL-Next] [F4179061].mkv
Gurren Lagann Parallel Works 2 [anidb2-7485]/extras/Gurren Lagann Parallel Works 2 - Ep QQ (2+) (BD 1280x720) [RUELL-Next] [43A547F0].mkv

Here are the ScudLee mappings for them. They look right, so no custom mapping xml is being used.

  <anime anidbid="6082" tvdbid="80096" defaulttvdbseason="0">
    <name>Gurren Lagann Parallel Works</name>
    <mapping-list>
      <mapping anidbseason="0" tvdbseason="0">;1-0;</mapping>
      <mapping anidbseason="1" tvdbseason="0">;1-6;2-7;3-8;4-9;5-10;6-11;7-12;8-13;</mapping>
    </mapping-list>
  </anime>

  <anime anidbid="7485" tvdbid="80096" defaulttvdbseason="0">
    <name>Gurren Lagann Parallel Works 2</name>
    <mapping-list>
      <mapping anidbseason="1" tvdbseason="0">;1-14;2-15;3-16;4-17;5-18;6-19;7-20;</mapping>
    </mapping-list>
  </anime>

@ZeroQI said:
@deusxanime: it’s simple enough

  • tvdb leave series as they are
  • tvdb2 insert season folders and reset ep number at 1 each season
  • tvdb3 insert season folders and keep absolute numbers (for long series, what you want i believe)
  • tvdb4 let user choose whatever folder and keep absolute numbers (for long series with sagas) and i used the tvdb4 mapping file to use arks instead of seasons, or to solve half season mess with thetvdb where it doesn’t sometime make sense. users can make their own season folders too as long as they leave the ep absolute number

Hi. I’m trying to understand how to apply this in my case but I’m afraid I’m not clear what situation applies to me.

I have Clone Wars (TheTVDB 83268) in this structure:

TV
  \_Star Wars The Clone Wars
    \_Season 1
      \_ Star Wars- The Clone Wars 1x01 - Ambush

Which works OK for the normal Plex TV Scanner.

I have this series in another library (“TV Absolute”) since I want to see it in absolute order (this is why I installed the ABS Scanner for).

As you can see from TheTVDB, the absolute order spans all seasons:

1: 2x16
2: 1x16
3: 3x01
4: 3x03
5: 1x01

So. How should I name & order the files and how should the .id file be named so this is taken as a single huge season in the proper order?

I have tried putting all files in the root folder for the series (that created stacked episodes), I tried tvdb.id, tvdb2.id and tvdb3.id. Nothing seems to have the intended effect. Everything just loads the normal seasons with the normal episodes in them.

I tried the readme file in github and the forum posts but it doesn’t seem to work out. I tried renaming the files to SxxExx but that didn’t help either.

NOTE: I just noticed the pre-defined log path for Darwin (MacOS) is:
$HOME/Library/Application Support/Plex Media Server/Logs

But in my set-up (not tweaked at all) the default Plex Media Server log path is:
$HOME/Library/Logs/Plex Media Server

Just for debug purposes I’ve created “$HOME/Library/Application Support/Plex Media Server/Logs” to see if logs are saved to it.

you can display absolute series with seasons or sagas as seasons, but not the other way around.
rename with absolute numbering all if you want that but the agent will not populate the metadata for the eps beyond first season

@ZeroQI - Update on Gurren Lagann Parallel Works issue…

I was continuing to work through my library and added 2 folders using anidb2 tagging which made one entry “Happy Lesson” (name isn’t really important, but nonetheless there it is). I realized something was mapped wrong in ScudLee, so I made a custom xml and tried to Plex Dance the 2 folders to get it to re-detect and map properly. The very odd thing was though that after removing the folders from my main root folder and rescanning, the series continued to be stuck there! After a lot of messing around, moving new folders in to force new entries in an attempt to get it to pick up the change, eventually I thought back on to those Parallel Works issues. In the scanner log that I pasted earlier I saw that they didn’t even have the normal empty line after each entry which made me think it really must be crashing ASS or something serious. Anyway, I removed all the Gurren Lagann folders, including Parallel Works, and sure enough after that I did a scan and Happy Lesson cleared out. So it was preventing my library from updating properly in some way (though it had been letting me add other new things to this point).

Given that, I’ve moved it to a separating test folder and set up a test library in which to scan it again and provide you full logs in hopes it can help you troubleshoot. (No HAMA log, probably because this has been pulled down before?)

uploaded fix. could reproduce, then fix:

Scanner call - root: '/volume1/downloads/_Plex_Current issues', path: 'Gurren Lagann Parallel Works 2 [anidb2-7485]', dirs: '0', files: '2'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Loading local custom mapping - url: '/volume1/downloads/_Plex_Current issues/anime-list-custom.xml'
anidbTvdbMapping() - anidb: '7485', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works 2', mappingList: '{'s1e3': 's0e16', 's1e2': 's0e15', 's1e1': 's0e14', 's1e7': 's0e20', 's1e6': 's0e19', 's1e5': 's0e18', 's1e4': 's0e17', 'episodeoffset': None}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"Gurren Lagann Parallel Works 2 [tvdb-80096]" s0000e001-007 (Orig: s01e01-07) "Gurren Lagann Parallel Works 2 - Ep 01-07 (BD 1280x720) [RUELL-Next] [F4179061].mkv"

Scanner call - root: '/volume1/downloads/_Plex_Current issues', path: 'Gurren Lagann Parallel Works [anidb2-6082]', dirs: '0', files: '3'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Loading local custom mapping - url: '/volume1/downloads/_Plex_Current issues/anime-list-custom.xml'
anidbTvdbMapping() - anidb: '6082', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works', mappingList: '{'s1e3': 's0e8', 's1e2': 's0e7', 's1e1': 's0e6', 's1e7': 's0e12', 's1e6': 's0e11', 's1e5': 's0e10', 's1e4': 's0e9', 's1e8': 's0e13', 's0e1': 's0e0', 'episodeoffset': None}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"Gurren Lagann Parallel Works [tvdb-80096]" s0000e001-006 (Orig: s01e01-06) "Gurren Lagann Parallel Works - Ep 01-06 [+Ep 08] (BD 1280x720) [RUELL-Next] [0D2ED2CD].mkv"
"Gurren Lagann Parallel Works [tvdb-80096]" s0000e012 (Orig: s01e07) "Gurren Lagann Parallel Works - Ep 07 (BD 1280x720) [RUELL-Next] [D163D7D6].mkv"

@ZeroQI - Updated ASS/HAMA to latest github master and recreated test library with Gurren Lagann. It is now picking up the files for Parallel Box 1 & 2, but does not seem to apply the mapping to them properly. Not sure if that is due to being multi episode files, but the one file that is single episode does map correctly.

Here’s from the scanner log:

Scanner call - root: '/mnt/videos/anime_ass_test', path: 'Gurren Lagann Parallel Works 2 [anidb2-7485]', dirs: '1', files: '1'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"/mnt/videos/anime_ass_test/Gurren Lagann Parallel Works 2 [anidb2-7485]/extras" match IGNORE_DIRS_RX: "Extras"
Use existing: '/tmp/anime-list-corrections.xml'
anidbTvdbMapping() - No valid tvbdbid: '293088' found for anidbid '7485'
Use existing: '/tmp/ASS-tmp-anime-list-master.xml'
anidbTvdbMapping() - anidb: '7485', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works 2', mappingList: '{'s1e3': 's0e16', 's1e2': 's0e15', 's1e1': 's0e14', 's1e7': 's0e20', 's1e6': 's0e19', 's1e5': 's0e18', 's1e4': 's0e17', 'episodeoffset': ''}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"Gurren Lagann Parallel Works 2 [tvdb-80096]" s0000e001-007 (Orig: s01e01-07) "Gurren Lagann Parallel Works 2 - Ep 01-07 (BD 1280x720) [RUELL-Next] [F4179061].mkv"

Scanner call - root: '/mnt/videos/anime_ass_test', path: 'Gurren Lagann Parallel Works [anidb2-6082]', dirs: '0', files: '2'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Use existing: '/tmp/anime-list-corrections.xml'
anidbTvdbMapping() - No valid tvbdbid: '293088' found for anidbid '6082'
Use existing: '/tmp/ASS-tmp-anime-list-master.xml'
anidbTvdbMapping() - anidb: '6082', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works', mappingList: '{'s1e3': 's0e8', 's1e2': 's0e7', 's1e1': 's0e6', 's1e7': 's0e12', 's1e6': 's0e11', 's1e5': 's0e10', 's1e4': 's0e9', 's1e8': 's0e13', 's0e1': 's0e0', 'episodeoffset': ''}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
"Gurren Lagann Parallel Works [tvdb-80096]" s0000e001-006 (Orig: s01e01-06) "Gurren Lagann Parallel Works - Ep 01-06 [,08] (BD 1280x720) [RUELL-Next] [0D2ED2CD].mkv"
"Gurren Lagann Parallel Works [tvdb-80096]" s0000e012 (Orig: s01e07) "Gurren Lagann Parallel Works - Ep 07 (BD 1280x720) [RUELL-Next] [D163D7D6].mkv"

Not using custom xml, so should just be pulling from ScudLee mapping list:

  <anime anidbid="6082" tvdbid="80096" defaulttvdbseason="0">
    <name>Gurren Lagann Parallel Works</name>
    <mapping-list>
      <mapping anidbseason="0" tvdbseason="0">;1-0;</mapping>
      <mapping anidbseason="1" tvdbseason="0">;1-6;2-7;3-8;4-9;5-10;6-11;7-12;8-13;</mapping>
    </mapping-list>
  </anime>

  <anime anidbid="7485" tvdbid="80096" defaulttvdbseason="0">
    <name>Gurren Lagann Parallel Works 2</name>
    <mapping-list>
      <mapping anidbseason="1" tvdbseason="0">;1-14;2-15;3-16;4-17;5-18;6-19;7-20;</mapping>
    </mapping-list>
  </anime>

@ZeroQI said:
you can display absolute series with seasons or sagas as seasons, but not the other way around.
rename with absolute numbering all if you want that but the agent will not populate the metadata for the eps beyond first season

I’m sorry, I don’t understand. I think I’m not understanding what each thing means.

I want to display the series with the absolute numbering (which currently lists all 100+ episodes in a single list, without seasons), I understood the scanner could take the normal season/episode order and display it with the absolute order. Did I misunderstand what the scanner does?

My goal was to have the series in a normal “TV” Library so it shows with traditional seasons and episodes and in a “TV Absolute” library that takes the same files but displays them properly.

Is this something I can’t do? I’m not trying to be thick here, but I may just have misunderstood what the scanner does exactly.

@eduo yes you misunderstood, it does the transformation the other way around compining multiple absolute series into seasons.

The scanner by default show the eps as they are with their seasons as it is.
It can however through the use of force ids take an absolute numbered serie (like on AniDB) and virtually show it:

  • with sagas (tvdb4), keeping the absolute number
  • with seasons (tvdb3), keeping the absolute number
  • just tvdb seasons reseting ep number at 1 each season (tvdb2)
  • not having to look at the mapping and show it as thetvdb (anidb2 mode) so multiple season serie folder magically merge as if following thetvdb convention with seasons

The premise is that you start from an absolutely numbered serie. This was done as on tablets, more that 100 eps are not scroll-able, as every season is a different serie for japanese anime and grouping them like in hte tvdb make more sense to find all in one place.

I could add something like tvdb5 mode but would have to modify the already complex scanner AND agent agent, and tvdb might not have the absolute numbering and anidb might not even have a serie will all eps in a single season…
You case example only existed with seasons, so i don’t find it a popular not logical choice, i just don’t see the added value and as it is, it is not possible in the scanner

@ZeroQI said:

The premise is that you start from an absolutely numbered serie. This was done as on tablets, more that 100 eps are not scroll-able, as every season is a different serie for japanese anime and grouping them like in hte tvdb make more sense to find all in one place.

Thank you. I misunderstood that it took a series numbered “normally” and mapped those normal episodes to TheTVDB’s IDs, which in turn meant the list could be displayed on any TheTVDB order.

For my case, then, where the absolute order in TheTVDB has no seasons and it’s just a hundred or so episodes, how should I number the episodes?

From my example above:

2x16 becomes absolute episode 1
1x16 becomes absolute episode 2
3x01 becomes absolute episode 3
3x03 becomes absolute episode 4
1x01 becomes absolute episode 5

So:

S02E16.mkv should be renamed 1.mkv or can I make a mapping xml to be used so I don’t have to rename the files?

(in the absolute order there are no seasons, I don’t know how this would be reflected in the numbering and on Plex itself)

I would love a TVDB5 mode that displays “normal-numbered” episodes in the absolute order, but I can understand how this would complicate things a lot. To me it would be the best of both worlds, as I could have the same series in two libraries, with the “normal” and the “absolute” orders (if I have to rename the files I’ll use hardlinks so I can keep this idea)

The issue is anidb doesn’t have “Star Wars The Clone Wars” and the custom mapping file map a whole anidb serie id to a tvdbid, and can map eps to a season within that season but cannot map eps of multiple seasons to multiple different seasons within the same season so no way to make this work as it is currently…

So you are saying, because i didn’t understood that, tvdb has seasons and eps, but has entered an absolute number which is all over the place but corresponds to a set chronological order.
in that case, yes i can support it because there is a case use but i never hear of that situation before…
Any other series have this weird viewing order ?

I suggest tvdb5 mode which will transform tvdb numbering into absolute tvdb numbering but need to load serie xml…
will take time

@eduo please do the following:

Here is my scanner output showing it did map correctly. the [abs xxx] was not used and is there just so i see quickly if it mapped ok…

Scanner call - root: '/volume1/downloads/_Plex_Current issues', path: 'Star Wars The Clone Wars [tvdb5-83268]', dirs: '0', files: '5'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
folder_show: 'Star Wars The Clone Wars [tvdb5-83268]', folder_season: 'None', tvdb mode: '5', tvdb id: '83268'
TVDB season mode (5) enabled, tvdb serie rl: 'http://thetvdb.com/api/A27AD9BE0DA63333/series/83268/all/en.xml'
mappingList: '{'s5e20': 's1e108', 's3e5': 's1e45', 's3e4': 's1e49', 's3e7': 's1e47', 's3e6': 's1e46', 's3e1': 's1e3', 's3e3': 's1e4', 's3e2': 's1e48', 's3e9': 's1e52', 's3e8': 's1e50', 's5e13': 's1e101', 's5e12': 's1e100', 's5e11': 's1e99', 's5e10': 's1e98', 's5e17': 's1e105', 's5e16': 's1e104', 's5e15': 's1e103', 's5e14': 's1e102', 's5e19': 's1e107', 's5e18': 's1e106', 's3e15': 's1e59', 's3e14': 's1e58', 's3e17': 's1e61', 's3e16': 's1e60', 's3e11': 's1e54', 's3e10': 's1e53', 's3e13': 's1e57', 's3e12': 's1e56', 's3e19': 's1e63', 's3e18': 's1e62', 's4e10': 's1e76', 's4e11': 's1e77', 's4e12': 's1e78', 's4e13': 's1e79', 's4e14': 's1e80', 's4e15': 's1e81', 's4e16': 's1e82', 's4e17': 's1e83', 's4e18': 's1e84', 's4e19': 's1e85', 's1e22': 's1e51', 's1e20': 's1e23', 's1e21': 's1e24', 's1e17': 's1e20', 's1e16': 's1e2', 's1e15': 's1e19', 's1e14': 's1e18', 's1e13': 's1e17', 's1e12': 's1e16', 's1e11': 's1e15', 's1e10': 's1e14', 's1e19': 's1e22', 's1e18': 's1e21', 's4e2': 's1e68', 's4e3': 's1e69', 's4e1': 's1e67', 's4e6': 's1e72', 's4e7': 's1e73', 's4e4': 's1e70', 's4e5': 's1e71', 's4e8': 's1e74', 's4e9': 's1e75', 's2e12': 's1e39', 's2e13': 's1e40', 's2e10': 's1e37', 's2e11': 's1e38', 's2e16': 's1e1', 's2e17': 's1e28', 's2e14': 's1e41', 's2e15': 's1e55', 's2e18': 's1e29', 's2e19': 's1e30', 's3e20': 's1e64', 's3e21': 's1e65', 's3e22': 's1e66', 's1e3': 's1e7', 's1e2': 's1e6', 's1e1': 's1e5', 's1e7': 's1e11', 's1e6': 's1e10', 's1e5': 's1e9', 's1e4': 's1e8', 's1e9': 's1e13', 's1e8': 's1e12', 's2e22': 's1e44', 's2e21': 's1e43', 's2e20': 's1e42', 's4e21': 's1e87', 's4e20': 's1e86', 's4e22': 's1e88', 's5e7': 's1e95', 's5e6': 's1e94', 's5e5': 's1e93', 's5e4': 's1e92', 's5e3': 's1e90', 's5e2': 's1e90', 's5e1': 's1e89', 's5e9': 's1e97', 's5e8': 's1e96', 's6e12': 's1e120', 's6e13': 's1e121', 's6e10': 's1e118', 's6e11': 's1e119', 's6e8': 's1e116', 's6e9': 's1e117', 's6e4': 's1e112', 's6e5': 's1e113', 's6e6': 's1e114', 's6e7': 's1e115', 's6e1': 's1e109', 's6e2': 's1e110', 's6e3': 's1e111', 's2e8': 's1e35', 's2e9': 's1e36', 's2e1': 's1e25', 's2e2': 's1e26', 's2e3': 's1e27', 's2e4': 's1e31', 's2e5': 's1e32', 's2e6': 's1e33', 's2e7': 's1e34'}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
misc: '|||||||||||s01e01|||||||||||s01e16|||||||||||s02e16|||||||||||s03e01|||||||||||s03e03|'
misc_count: '{'': 2, 's03e03': 1, 's03e01': 1, 'star': 5, 'clone': 5, 'wars': 10, 's01e16': 1, 's02e16': 1, 's01e01': 1, 'the': 5}'
misc_words: '['star', 'clone', 'wars', 'the']'
"Star Wars The Clone Wars [tvdb5-83268]" s0001e005 (Orig: s01e01) "Star Wars The Clone Wars s01e01 [abs 005].mkv" "1"
"Star Wars The Clone Wars [tvdb5-83268]" s0001e002 (Orig: s01e16) "Star Wars The Clone Wars s01e16 [abs 002].mkv" "1"
"Star Wars The Clone Wars [tvdb5-83268]" s0001e001 (Orig: s02e16) "Star Wars The Clone Wars s02e16 [abs 001].mkv" "1"
"Star Wars The Clone Wars [tvdb5-83268]" s0001e003 (Orig: s03e01) "Star Wars The Clone Wars s03e01 [abs 003].mkv" "1"
"Star Wars The Clone Wars [tvdb5-83268]" s0001e004 (Orig: s03e03) "Star Wars The Clone Wars s03e03 [abs 004].mkv" "1"

@ZeroQI - Still having issues with “Gurren Lagann Parallel Works” S1 & S2 not mapping correctly. Updated to latest ASS/HAMA and it seems some of the changes you have done recently may now make it map very strangely. Before it was at least detecting the episode files correctly but just not seeming to apply the mapping xml, but now it is doing some strange stuff with where it is putting things.

A couple other issues I’ve run into since then as well…

For “Tales of Xestiria the X” I have a custom xml due to ScudLee list being wrong. It has a negative offset in the custom xml’s series tag and doesn’t seem to be apply it, though the individual specific mapping of anidb Ep 01 to tvdb s0e02 is working.

<?xml version="1.0" encoding="utf-8"?>
<anime-list>
  <anime anidbid="11273" tvdbid="311014" defaulttvdbseason="1" episodeoffset="-1">
    <name>Tales of Zestiria the Cross</name>
    <mapping-list>
      <mapping anidbseason="1" tvdbseason="0">;1-2;</mapping>
    </mapping-list>
  </anime>
</anime-list>

As you can see though it doesn’t seem to be picking the negative offset up and is just mapping Ep 02 to s1e02, Ep 03 to s1e03, and so on for s1.

Lastly, I have a fairly complicated one. I’m using anidb2 tagging to map the various Hetalia series to its TVDB entry. For “Hetalia - Axis Powers” it actually needs to map to TVDB s1 and s2. And for “Hetalia - World Series” it should map to TVDB s3 and s4. ScudLee has both these wrong using defaulttvdbseason=“a” for the former, and only mapping to s3 for the latter. Thus I made custom xml for both to map the later half of each anidb series to the right tvdb seasons. I’m not worried about maintaining absolute numbering, so long as they map to the right seasons. Here are the custom xmls:

<?xml version="1.0" encoding="utf-8"?>
<anime-list>
  <anime anidbid="6234" tvdbid="88161" defaulttvdbseason="1">
    <name>Hetalia: Axis Powers</name>
    <mapping-list>
      <mapping anidbseason="1" tvdbseason="2" start="27" end="52" offset="-26"/>
    </mapping-list>
  </anime>
</anime-list>

<?xml version="1.0" encoding="utf-8"?>
<anime-list>
  <anime anidbid="7448" tvdbid="88161" defaulttvdbseason="3">
    <name>Hetalia World Series</name>
    <mapping-list>
      <mapping anidbseason="0" tvdbseason="0">;1-5;2-6;3-7;4-501;5-502;</mapping>
      <mapping anidbseason="1" tvdbseason="4" start="25" end="48" offset="-24"/>
    </mapping-list>
  </anime>
</anime-list>

It seems to be not picking up either of those mappings to s2 or s4 in the above, again not sure if due to negative offset or some other issue. It does apply the anidb s0 > tvdb s0 mappings above though, so I believe it is reading the xml correctly. As you can see it is missing s2 and s4 and is just putting those episodes as normal in s1 and s3 rather than mapping to other sesason.

After updating ASS/HAMA, I deleted test library and logs, so they would be clean. Then created new library with just the above shows. Attaching those logs.

@ZeroQI said:
So you are saying, because i didn’t understood that, tvdb has seasons and eps, but has entered an absolute number which is all over the place but corresponds to a set chronological order.

Yes. Clone Wars was aired out of order across multiple seasons. So the “aired order” follows the standard season/episode but the absolute order spans all seasons (it could be seen as if there is a single season with over 100 episodes). The “absolute order” is the “proper order”, too, as confirmed by Lucasfilm. It seems the whole series was subject to meddling from producers, tv schedules and George Lucas.

in that case, yes i can support it because there is a case use but i never hear of that situation before…
Any other series have this weird viewing order ?

I’ve seen single episodes belonging to different seasons, but never that the totality of the TV has the problem. Futurama comes close, with episodes from the 3rd season airing on the 6th

I suggest tvdb5 mode which will transform tvdb numbering into absolute tvdb numbering but need to load serie xml…

I can build the XML with the mappings. I’ll take a look at it and report back then to see how it looks filling a single season (I understand it probably won’t work, but I don’t have anything better to do until tvdb5 is available :smiley: )

Eduo

@eduo please update scanner and agent and rename the serie folder with tvdb5 force and it should work as you want already

@deusxanime solved the multi ep mapping issue in Gurren Lagann Parallel Works
Scanner call - root: ‘/volume1/downloads/_Plex_Current issues’, path: ‘Gurren Lagann Parallel Works 2 [anidb2-7485]’, dirs: ‘0’, files: ‘2’
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Loading local custom mapping - url: ‘/volume1/downloads/_Plex_Current issues/anime-list-custom.xml’
anidbTvdbMapping() - anidb: ‘7485’, tvbdid: ‘80096’, defaulttvdbseason: ‘0’, name: ‘Gurren Lagann Parallel Works 2’, mappingList: ‘{‘s1e3’: ‘s0e16’, ‘s1e2’: ‘s0e15’, ‘s1e1’: ‘s0e14’, ‘s1e7’: ‘s0e20’, ‘s1e6’: ‘s0e19’, ‘s1e5’: ‘s0e18’, ‘s1e4’: ‘s0e17’, ‘episodeoffset’: None}’
-------------------------------------------------------------------------------------------------------------------------------------------------------------
misc: ‘|ep|01|07|’
misc_count: ‘{’’: 2, ‘01’: 1, ‘ep’: 1, ‘07’: 1}’
misc_words: ‘[]’
“Gurren Lagann Parallel Works 2 [tvdb-80096]” s0000e014-020 (Orig: s01e01-07) “Gurren Lagann Parallel Works 2 - Ep 01-07 (BD 1280x720) [RUELL-Next] [F4179061].mkv”

Scanner call - root: '/volume1/downloads/_Plex_Current issues', path: 'Gurren Lagann Parallel Works [anidb2-6082]', dirs: '0', files: '3'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Loading local custom mapping - url: '/volume1/downloads/_Plex_Current issues/anime-list-custom.xml'
anidbTvdbMapping() - anidb: '6082', tvbdid: '80096', defaulttvdbseason: '0', name: 'Gurren Lagann Parallel Works', mappingList: '{'s1e3': 's0e8', 's1e2': 's0e7', 's1e1': 's0e6', 's1e7': 's0e12', 's1e6': 's0e11', 's1e5': 's0e10', 's1e4': 's0e9', 's1e8': 's0e13', 's0e1': 's0e0', 'episodeoffset': None}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
misc: '|||01|06|||07|'
misc_count: '{'': 2, '01': 1, '06': 1, 'ep': 2, '07': 1}'
misc_words: '['ep']'
"Gurren Lagann Parallel Works [tvdb-80096]" s0000e006-011 (Orig: s01e01-06) "Gurren Lagann Parallel Works - Ep 01-06 [+Ep 08] (BD 1280x720) [RUELL-Next] [0D2ED2CD].mkv"
"Gurren Lagann Parallel Works [tvdb-80096]" s0000e012 (Orig: s01e07) "Gurren Lagann Parallel Works - Ep 07 (BD 1280x720) [RUELL-Next] [D163D7D6].mkv"

@ZeroQI - Just updated ASS/HAMA to latest masters and recreated library. Gurren Lagann specials now looking good!

Hopefully you can figure out the negative offset or whatever issue having with those other couple series. I thought you had addressed negative offset previously, but maybe this is slight different bug than then.

@deusxanime negative offset fix. “-1”.isdigit() return false…

to convert string with negative number in int:

offset_episode = 0-int(mappingList['episodeoffset'][1:]) if mappingList['episodeoffset'].startswith('-') else int(mappingList['episodeoffset']) if mappingList['episodeoffset'].isdigit() else 0

try should solve all issues. here is my test output:

Scanner call - root: '/volume1/downloads/_Plex_Current issues', path: 'Tales of Xestiria the X [anidb2-11273]', dirs: '0', files: '4'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Loading local custom mapping - url: '/volume1/downloads/_Plex_Current issues/anime-list-custom.xml'
anidbTvdbMapping() - anidb: '11273', tvbdid: '311014', defaulttvdbseason: '1', name: 'Tales of Zestiria the Cross', mappingList: '{'s1e1': 's0e2', 'episodeoffset': '-1'}'
-------------------------------------------------------------------------------------------------------------------------------------------------------------
misc: '|ep01|ep02|ep04|'
misc_count: '{'': 2, 'ep02': 1, 'ep01': 1, 'ep04': 1}'
misc_words: '[]'
"Tales of Xestiria the X [tvdb-311014]" s0000e002 (Orig: s01e01) "Tales of Xestiria the X ep01.mkv"
"Tales of Xestiria the X [tvdb-311014]" s0001e001 (Orig: s01e02) "Tales of Xestiria the X ep02.mkv"
"Tales of Xestiria the X [tvdb-311014]" s0001e003 (Orig: s01e04) "Tales of Xestiria the X ep04.mkv"

@ZeroQI - Updated to latest ASS/HAMA master. Something appears to have broken though. Took a while to scan even with only 3 series and many episodes missing. On the other hand, “Tales of Zestiria the X” is offsetting correctly now. =)

Many entries missing in scanner log and missing normal blank line between entries, think scanner crashing/errorring. Attaching logs.