[Rel] HTTP Anidb Metadata Agent (HAMA)

Not certain this is relevent or already discussed but I noticed an issue when trying to work out a custom anime-list.

<anime anidbid="9980" tvdbid="114801" defaulttvdbseason="a" episodeoffset="175" tmdbid="" imdbid=""> <name>Fairy Tail (2014)</name> </anime>

it appears to append the episodeoffset instead of add it.

2016-02-03 01:01:11,927 (2b8c09654700) : DEBUG (__init__:491) - TVDB mapping episode summary - anidb_ep: 's1e1', tvdb_ep: '1175', season: '1', epNumVal: '1', defaulttvdbseason: 'a', title: 'King of the Dragons', summary: ''

So if I understand this right, instead of searching for episode 176 on thetvdb.com it searches for episode 1175 and fails to locate it.

Hopefully this info is of use to you, terrific work on the agent, thank you.

@curtdwar said:
Not certain this is relevent or already discussed but I noticed an issue when trying to work out a custom anime-list.

<anime anidbid="9980" tvdbid="114801" defaulttvdbseason="a" episodeoffset="175" tmdbid="" imdbid=""> <name>Fairy Tail (2014)</name> </anime>

it appears to append the episodeoffset instead of add it.

2016-02-03 01:01:11,927 (2b8c09654700) : DEBUG (__init__:491) - TVDB mapping episode summary - anidb_ep: 's1e1', tvdb_ep: '1175', season: '1', epNumVal: '1', defaulttvdbseason: 'a', title: 'King of the Dragons', summary: ''

So if I understand this right, instead of searching for episode 176 on thetvdb.com it searches for episode 1175 and fails to locate it.

Hopefully this info is of use to you, terrific work on the agent, thank you.

This is also happening in the anime-list-master.xml. I notified scudlee of a few changes and he applied them within hours. the new record is

<anime anidbid="9980" tvdbid="114801" defaulttvdbseason="a" episodeoffset="175" tmdbid="" imdbid=""> <name>Fairy Tail (2014)</name> </anime>

after a clear-cache I can confirm it is appending 1 and 175 not adding the offset.

I also tried another way in an anime-list-custom.xml.

<?xml version="1.0" encoding="utf-8"?> <anime-list> <anime anidbid="9980" tvdbid="114801" defaulttvdbseason="" episodeoffset="" tmdbid="" imdbid=""> <name>Fairy Tail (2014)</name> <mapping-list> <mapping anidbseason="1" tvdbseason="5" start="1" end="51"></mapping> <mapping anidbseason="1" tvdbseason="6" start="52" end="90"></mapping> </mapping-list> </anime> </anime-list>

but it returns a blank season. tvdb_ep: ā€˜se4’

2016-02-03 13:22:31,403 (2b8f136e3700) : DEBUG (__init__:491) - TVDB mapping episode summary - anidb_ep: 's1e1', tvdb_ep: 'se1', season: '1', epNumVal: '1', defaulttvdbseason: '', title: 'King of the Dragons', summary: ''

Excellent detailed report, thanks for that. Please try the fix: (can’t test at the moment but should have fixed all)
https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/init.py

I was adding the variables but they were string so concatenated instead:
a=ā€œ1ā€; b=ā€œ2ā€
a+b=ā€œ12ā€
str(int(a)+int(b))=ā€œ3ā€

That should solve missing summaries for series

that works. My entire collection is now updated. Thank you very much.

but it returns a blank season. tvdb_ep: ā€˜se4’
2016-02-03 13:22:31,403 (2b8f136e3700) : DEBUG (init:491) - TVDB mapping episode summary - anidb_ep: ā€˜s1e1’, tvdb_ep: ā€˜se1’, season: ā€˜1’, epNumVal: ā€˜1’, defaulttvdbseason: ā€˜ā€™, title: ā€˜King of the Dragons’, summary: ā€˜ā€™

I notice that still doesn’t work, but currently I do not have anything using that format.

Thanks for your assistance and letting me know, because i modified the source without any tests but all is good :smiley:
I need an example using the format i guess…

@ZeroQI said:
Excellent detailed report, thanks for that. Please try the fix: (can’t test at the moment but should have fixed all)
Hama.bundle/Contents/Code/__init__.py at master Ā· ZeroQI/Hama.bundle Ā· GitHub

I was adding the variables but they were string so concatenated instead:
a=ā€œ1ā€; b=ā€œ2ā€
a+b=ā€œ12ā€
str(int(a)+int(b))=ā€œ3ā€

That should solve missing summaries for series

would this fix the problems im having?

It solve anidb to tvdb mapping so episode information missing like summaries and title missing

@ZeroQI said:
It solve anidb to tvdb mapping so episode information missing like summaries and title missing

AH… Ok… I will still apply it since I think I have a few of those missing as well. Have you made any head way with the mapping?

@saitoh183: Not really. The algorythm in the scanner version you attached is identical.
I tested both files and the ep number is as it should…
. Death Note - 36 - 1.28 [TSR].mkv
. Attack on Titan - 01 - To You, 2000 Years in the Future - The Fall of Zhiganshina (1) [EveTaku].mkv

https://github.com/ZeroQI/Absolute-Series-Scanner/blob/master/Scanners/Series/Absolute%20Series%20Scanner%20-%20Alpha.py

Please try this version and report.

@ZeroQI said:
@saitoh183: Not really. The algorythm in the scanner version you attached is identical.
I tested both files and the ep number is as it should…
. Death Note - 36 - 1.28 [TSR].mkv
. Attack on Titan - 01 - To You, 2000 Years in the Future - The Fall of Zhiganshina (1) [EveTaku].mkv

https://github.com/ZeroQI/Absolute-Series-Scanner/blob/master/Scanners/Series/Absolute%20Series%20Scanner%20-%20Alpha.py

Please try this version and report.

So you dont get this?


@ZeroQI said:
@saitoh183: Not really. The algorythm in the scanner version you attached is identical.
I tested both files and the ep number is as it should…
. Death Note - 36 - 1.28 [TSR].mkv
. Attack on Titan - 01 - To You, 2000 Years in the Future - The Fall of Zhiganshina (1) [EveTaku].mkv

https://github.com/ZeroQI/Absolute-Series-Scanner/blob/master/Scanners/Series/Absolute%20Series%20Scanner%20-%20Alpha.py

Please try this version and report.

even with your latest Alpha still no go. I tried removing Titan series, empty trash, and re-adding just episode 1 and its the same problem…also tried creating a new library. Could my Agent configuration be the issue?

@ZeroQI

Something weird i added the death note episode ā€œDeath Note - 36 - 1.28 [TSR].mkvā€ it appears right when i create a new library and put the problem file in it but in my real anime folder it fails if i remove and add it back. Titan still failed when i put it in the new folder…i just dont understand how this scanner works.

Give me the filelist for your real anime
It find the ep number from the left but remove the folder name from the filename and skip the number if present 3 times in the other filenames in the folder… the issue is caused by titles having numbers too and triggering this condition

@ZeroQI

How do I turn on the creation of a file list. It used to do it on its own but even with my log path edit, I do see it being generated. Do I need to enable it?

@saitoh183 said:
@ZeroQI

How do I turn on the creation of a file list. It used to do it on its own but even with my log path edit, I do see it being generated. Do I need to enable it?

I think you removed the code in the Alpha script for the filelist generation…i found reference to the word filelist in the old Scanner file but not in the Alpha.

I think you are right, because there is no file array created
Can you create one from the old scanner so i can buil a duplicate of your library?

@ZeroQI said:
I think you are right, because there is no file array created
Can you create one from the old scanner so i can buil a duplicate of your library?
@ZeroQI
will you add it back to alpha?

@saitoh183 said:

@ZeroQI said:
I think you are right, because there is no file array created
Can you create one from the old scanner so i can buil a duplicate of your library?
@ZeroQI
will you add it back to alpha?

@ZeroQI

Have you made any head way?

@ZeroQI said:
Define ā€œthe issue with seasonsā€ā€¦
It shows eps as they are on hdd like every other agent.

Want virtual seasons on plex?
Add " [tvdb-79824]" to naruto shippuden folder name or 79824 to tvdb.id
file on Extras or root folder and it will use tvdb/season numbering on
absolute numbering series.
Do you mean that the content in the folder can be in abs number form and by adding the tvdb number in the title, it will make seasons in plex?

@saitoh183: implemented the filelist creation (didn’t published yet). took some time since so much was removed. got to look at your logs, and i can’t find a reason why it behaves like that for the season… It shouldn’t try with this naming convention. will dig more into this. will solve but will take some time but have your filelist so got all i need to reproduce