[Rel] HTTP Anidb Metadata Agent (HAMA)

ZeroQI, it seemed to start working better after after a few scans after I added the folders it could not. Plus I am new so I am sure there is a lot of user error, lol.

The mapping file format changed [see https://github.com/ZeroQI/Hama.bundle/issues/19] with addition of episode offset, and seaason start end and offset:

 <anime anidbid="516" tvdbid="76045" defaulttvdbseason="1" episodeoffset="0">
    <name>Princess Tutu</name>
    <mapping-list>
      <mapping anidbseason="1" tvdbseason="1" start="1" end="13" offset="0"/>
      <mapping anidbseason="1" tvdbseason="2" start="14" end="38" offset="-13"/>

Order of processing and impact on the mappingList array in my code:
1 individual mapping: mappingList [ ‘s1exx’ ] = ‘sXeXX’
2 offset: mappingList [ ‘s1’ ] = [start, end, offset]
3 episodeoffset: mappingList [ ‘episodeoffset’ ] = episodeoffset

Haven’t tested much but doesn’t crash. Let me know if for the anime listed on the tvdb policy change it works
https://forums.thetvdb.com/viewtopic.php?f=7&t=25066

Hey thanks for the heads up. So with this change we’ll just need to update to the latest code on github for the __init__.py file?

Yes. Make sure to save the raw file. There should be no html tags in the saved code.py

I decided to give this a go today as TVDB wasn’t picking up some animes. I’m starting small with a few and have ran into this. http://pastebin.com/b6Zhqqt9

I’ve got Akira, Trigun and Wolf’s Rain in this library. The TVDB has Trigun & Wolf’s Rain, but not Akira. It seems to pull Akira from AniDB correctly and Trigun - but when it hit’s Wolf’s Rain no metadata, summaries, banners/posters etc.

What other information do you need from me to help resolve this?

@ZeroQI

I haven’t updated in a long time(since the implementation of your list generation for troubleshooting) because everything was working pretty well
 Why update if it’s not broken
 Right? Well today it’s broken so I will update to see if it fixes the issue. The only thing I’m afraid of is will updating cause me to loose all my manual modifications? (manual artwork changes is my main concern) I did lock my name changes so I assume those will be fine but I have over 150 anime and i modified almost all the posters and backgrounds.

@ZeroQI

Also what is the proper way to upgrade?

Pick zip archives in prev post and update code.py from github

Don’t change the scanner in your case

@ZeroQI

Thanks

you mean from this post?

https://forums.plex.tv/discussion/comment/1009167/#Comment_1009167

Not replacing the Scanner will keep my current library intact?

Aslo where is code.py ?

On gitub.
Yes that’s the one archive.
Since the mapping file format changed, i had to update the agent.

Yes library will stay the same apart from agent data changes if field not locked.
On scanner change it would prob have to b recreated

@ZeroQI

@ZeroQI said:
Yes library will stay the same apart from agent data changes if field not locked.
On scanner change it would prob have to b recreated

Ok, so to recap:

  • Change agent with content of zip
  • for scanner, i change nothing and keep my current scanner? My library content that is not lock will change. Does this include artwork
which cant be locked?
  • could you link me to the code.py on git
cant seem to find it.

My reason for updating is that i noticed that new content isny being added anymore and since i havent updated since the june, i think first step would be to do so.

Yes.
Artwork should stay.
It’s init not code my bad
https://github.com/ZeroQI/Hama.bundle/blob/master/Contents/Code/init.py

@ZeroQI said:
Yes.
Artwork should stay.
It’s init not code my bad
Hama.bundle/Contents/Code/__init__.py at master · ZeroQI/Hama.bundle · GitHub

@ZeroQI

So i did the changes and im still getting failed scans.

It is not adding new content during scan and seems to stop prematurely. I have Naruto Shippuden eps 438 and its not there and entire series of Soukyuu no Fafner Dead Aggressor - Exodus 2 is missing. Also a few others.

ASS_Scanner Log : http://pastebin.com/kb95dRKg
ASS_Scanner Filelist: http://pastebin.com/NZHGv2Zf

using PMS: Plex-Media-Server-0.9.1402.1547-60c867f-en-US

Let me know if you need other info

Saitoh183, Can you adjust the settings of the Hamatv agent after doing all of these steps? After updating I can no longer get into the settings of the agent.

EDIT: Scratch that, I did not grab the raw init.py, so my file had HTML tags in it.

@bnaert said:
Saitoh183, Can you adjust the settings of the Hamatv agent after doing all of these steps? After updating I can no longer get into the settings of the agent.

EDIT: Scratch that, I did not grab the raw init.py, so my file had HTML tags in it.

@bnaert

Adjust which settings?

The mapping file change doesn’t seem to do anything. I have tried replacing just init.py and the entire hama.bundle folder, Fate/Zero (2012), Black Lagoon The Second Barage, Seraph of the End: Battle in Nagoya all just say TVDB Summary Missing when I click the refresh button for the show. Force refresh does nothing too, and removing a show, wiping bundles/trash then readding the show does nothing too.

@The Fire Kahuna : for “Fate/Zero (2012)” i need the foldername, season folders and filenames used to reproduce as i do not know which numbering convention you follow (anidb, tvdb), and if you forced the tvdbid
 using thetvdb numbering and “fate/zero” it works for me


http://thetvdb.com/?tab=seasonall&id=275798&lid=7

  <anime anidbid="8880" tvdbid="275798" defaulttvdbseason="1" episodeoffset="13" tmdbid="" imdbid="">
    <name>Fate/Zero (2012)</name>
    <mapping-list>
      <mapping anidbseason="0" tvdbseason="0">;1-6;2-7;3-8;</mapping>
    </mapping-list>
  </anime>

For Fate/Zero as an example, I use the following folder structure

  • FateZero
    ------ FateZero - S01E01 - Summoning of the Heroes.mkv
  • FateZero (2012)
    ------ FateZero (2012) - S01E01 - The Mion River Battle.mkv

No TVDBid forcing, no Season 1 folder (pointless)
This follows how anidb sets out Fate/Zero into two separate cours.