[Rel] HTTP Anidb Metadata Agent (HAMA)

scanner-agent-dev

#12

I use BABS to scan my anime with

OVA and OAD is the same, just diffrent names http://en.wikipedia.org/wiki/Original_video_animation


#13

Any instructions on installing this (Windows Server 2008 - Plex 0.9.86) would be greatly appreciated.


#14

Put it at the location below with the other.bundle files.

C:\Users\XXXXX\AppData\Local\Plex Media Server\Plug-ins


#15

I grabbed a zip of the master on git and also the latest xml from ScudLee.

Ran it through a few anime titles... one of which had >100 episodes using BABS and Hama

Parsed fine and loaded up all the metadata

Going to run it through part of my collection and see if any issues occur

Format - Worked no problems

   English Title/English Title - EP.container

Alt Format - Also worked without issues but ignored the OVAs... I'm assuming this is intended since they don't exist in the xmls

   English Title/Series/English Title - EP.container

   English Title/OVA/English Title - VolumeNo.container


#16

Thanks for your post Melator, i have very little feedback on my code, and previous buggy versions i release possibly didn't help its widespread use...

I am using a HP microserver N40L on which i installed DSM (the OS of synology NAS) that i downloaded on XPEnology.com (++ version has more drivers supported)

That allow to use alternate package servers to install 3rd party apps (sickbeard) but Plex is supported by default.

 

I have been moving houses and since i am a computer parts hoarder, and also have a day job, that is taking a lot of my time and i didn't do new development on the agent but on the other hand, i don't know what to improve as it pretty much work well for me, the studio icons are supported, multi language support is there, it logs the issue the user has a possibility to correct, etc...

The agent takes the posters from the tvdb not from anidb due to a fixed resolution hence fixed ratio. That also limited the anidb ban since we do one request per serie.

For windows the agent goes here: C:\Users\XXXXX\AppData\Local\Plex Media Server\Plug-ins

I am unsure if many of you use the clever html log generated (one instance of every warning present in them) to be able to update used databases easily as i wanted this agent to allow to benefit not only Plex users but all database users as it allow easy database update by including direct links when applicable

 Logs are located in DataItems since it's the only folder with write access available to the agents:

   . For me it's in \\NAS\Plex\Library\Application Support\Plex Media Server\Plug-in Support\Data\com.plexapp.agents.hama

   . For windows it should be in C:\Users\XXXXX\AppData\Local\Plex Media Server\Plug-ins\Data\com.plexapp.agents.hama

 
Here is the feedback logs description and one example of every feedback:

   . AniDB.htm        

        - Aid: 00002 No poster present

   . Anime-list.htm    ScudLee;s XML file feedback

       - Aid: 00002 '3x3 Eyes' AniDB and anime-list are both missing the studio

       - Aid: 00002 '3x3 Eyes' AniDB have studio 'xxx' and XML have 'yyy'

       - Aid: 00002 '3x3 Eyes' has no matching tvdbid ('OAV') in mapping file

       - Aid: 00002 anime-list is missing the anidbid

 

   . Themes.htm       Plex TV theme support whose filename is based on TheTVDB.com id and last 30s max. Wouldn't mind somebody a package will all complete mp3 theme songs whose name would be the AniDB ID (to account for the seasons different songs)...

        - Aid: 00002 '3x3 Eyes' tvdbid: 70973 '3x3 Eyes' Missing theme song 3x3 Eyes' No English poster

        - aid: 00002 tvdbid: 70973 '3x3 Eyes' Overview Empty

        - aid: 00002 tvdbid:70973 s1e1 Overview Empty


 


#17

On my debian box it's located here: /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.agents.hama/DataItems

I only see anime-list.htm and TVDB.htm in there though

I gave the Hama Movie scanner a whirl but it didn't pick up very many of my films.

I then updated from git today and re-ran the scan but nothing changed.. except when I hit refresh on the movie itself the metadata updated.

I've had other agents behave this way as well so I'm guessing something outside the agent or maybe plain old user error

Aside from the snag above everything worked out well.. Good job :)


#18

Thanks for giving the path on your box and for the nice feedback :D

It only create the logs if needed. i wanted to provide a way to feedback info easily to update databases so the users in OCD update the databases;)

Would you mind posting some of the movie titles and the filename associated so i try to reproduce?

Also, if you have (Implementable) feature requests... 


#19

I retested it and after a few manual name fixes, poorly named on my part, it picked up just about everything.

The only film it still can't find is Rao Den Jun'ai no Sho and for some films like Patlabor 1/2, Inuyasha, Tenchi Muyou and the two Evangelion films it's using the same cover art even though I have the AniDB > TVDB set in the config.

Raoh Den Junai no Sho - Director's Cut.mkv  (I've tried manual searches and did find it on TVDB through my browser but can't for the life of me get it to pick it up)

The only thing changed since the previous attempt has been a few PMS builds... one which had the new scanner so maybe that made the difference.

Can't think of anything more to add... you're pulling in all the data I typically look for in a series/movie.


#20

The TVDB is a database for TV series, not movies. It therefore cannot gather info that TheTVDB will not have, so no poster from thetvdb.

They can be included if anidb sets them as specials,and must be labeled as such.

For "Rao Den Jun'ai no Sho"  Anidb names it as S01e01 not a special from a serie.

did you try to label it as "Raoh Den Junai no Sho s01e01 [director's cut].mkv"

I do recommend BABS scanner...


#21

TVDB has it listed as a special which is why I thought it would get picked up

http://thetvdb.com/?tab=episode&seriesid=79156&seasonid=26601&id=2145591&lid=7

I'm using BABS as my scanner

I'm sure if I rename it to the english name it'll get picked up


#22

The agent uses Anidb numbering , with a translation table to get the posters and episode summary from thetvdb and correct episodes mapped differently....

If you name it "Shin Kyuuseishu Densetsu Hokuto no Ken Raou-den Jun`ai no Shou " or "Fist of the North Star 1 Legend of Raoh - Death for Love" (or any anidb matching title for that serie) with"s01e01.mkv" it should be recognised

I went on AniDB to find the anidb animeId [3038], then to the tvdb serie [id 79156] where it was showing as special (s00e05 with tvdb ep id 2145591)...

I went to github file [https://raw.github.com/ScudLee/anime-lists/master/anime-list-master.xml] and saw after searching:


Shin Kyuuseishu Densetsu Hokuto no Ken Raou-den Jun'ai no Shou

;1-0;
;1-5;

There is a first mapping where s00e01 in AniDB is mapped to S00e00 in TheTVDB.com

If you label the ep S01e01 it would be mapped correctly (to TheTVDB serie id 79156 episode s00e05)

http://thetvdb.com/?tab=season&seriesid=79156&seasonid=26601&lid=7


#23

Hi there tried to use this on Synology NAS (DS111 v4.3-3810).

The Plex media server works perfectly except when looking at Anime where it's completely lost. Hence I tried to use HAMA which really sounds great.

I did to place folder Hama.bundle with SSH root session into the following directory: 

/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins

I made sure owner and group owner of file were correctly set.

But I do not see the agent in Plex web?

Am I missing a step here?

----

For others I downloaded latest version from Git and Agent shows in plex web.

In the meantime I don't know if I did something wrong but I lost my sections in the battle.. :S

Anyway thanks for this i can't wait to see my anime list finally looking good.


#24

Please use "Plex folder in File Station" > Library > Application Support > Plex Media Server > Plug-ins > Hama.bundle > Contents > Code / Resources / Strings / Info.plist / DefaultPrefs.json.

Restart plex afterwards

I recommend BABS scanner for absolute mode (1 season anime)

http://forums.plexapp.com/index.php/topic/31081-better-absolute-scanner-babs/


#25

is ther any plan to support multi language? i do have some shows title in japanese and/or chinese. if i do a manual search on anidb and i can find the show. the name i have is listed under Synonym. but HAMA doesn't seems to pick the show up.


#26

It does support the language selection order on displayed titles but search all fields in qll languages (main titles, synonyms, etc...)

You can read the python source code as i kept all in a single file to know how it does... 

Can you give me the filename and anidb id ? at least i can look at why it doesn't find it...


#27

the show i have is http://anidb.net/perl-bin/animedb.pl?show=anime&aid=7275

i tried the both japanese title and chinese title. both didn't find any resoults, but when i tried the english title it did find it. also. under the search language. only option for me is 'english', the TVDB search listed other language search options. is that normal?

![post-196750-0-02659100-1387845393.png|645x349](upload://vauq8nu8KDJHB3wnWNj4ngEGLoc.png)


#28

in the __init__.py you can specify the language display order in french, english, romaji (x-jap), i didn't try kanji (ja) yet, but it should display it.

Hama search all fields [see below for xml extract] so you don't have to specify a language but dual byte characters are not supported currently, but it is not by design...

Thetvdb agent support searching dual byte characters like "よんでますよ, アザゼルさん." but cannot apply the method to HAMA, since it uses json...

Anidb agent seem to find the anime the same way...

よんã§ã¾ã™ã‚ˆ, アザゼルã•ã‚“.
AzazelOVA
Yondemasu yo, Azazel-san.
You`re Being Summoned, Azazel-san.
Призываю, Ðзазель-Ñан.
ЯвиÑÑŒ, Ðзазель OVA
æ¶é­”阿è¨è°¢å°”在å¬å”¤ä½
 
 
thetvdb show kanji as:
Searching for matches for {'show': '\xe3\x82\x88\xe3\x82\x93\xe3\x81\xa7\xe3\x81\xbe\xe3\x81\x99\xe3\x82\x88, \xe3\x82\xa2\xe3\x82\xb6\xe3\x82\xbc\xe3\x83\xab\xe3\x81\x95\xe3\x82\x93.', 'id': '19835', 'year': '2012'}
 
anidb show the title incorrectly yet find the info... i need to find how it does and reproduce in my code

#29

love the plugin, works great. now if only it used the screenshot thumbnails that already is on theTVTB aswell it would be close to perfect in my book


#30

hi ZeroQI, i've been playin around with the code over the weekend and i think i found an issue. i don't know if it's intentional or not.

in your getMainTitle(self, titles, LANGUAGE_PRIORITY) class, you have line

if type in ['official', 'main', None]  and lang in LANGUAGE_PRIORITY:             langTitles [ LANGUAGE_PRIORITY.index(lang) ] = title.text #type==none is for mapping file language

it cause the display title always come back as offical or main, so if i want anyother lanurage as displaying title, say 'ja' or 'zh-Hans' it will default back to 'offical' or 'main' title

so i removed the first part (or change 'and' to 'or') and it works like a charm. don't know if it helps or not. thanks for the great work!


#31
def getMainTitle(self, titles, LANGUAGE_PRIORITY) is used for getting the titles for series and episodes according choosen priority. priority can contain any number of languages
   . SERIE_LANGUAGE_PRIORITY = [ 'x-jat', 'en']
   . EPISODE_LANGUAGE_PRIORITY = [ 'en', 'x-jat']
 
langTitles = array contining LANGUAGE_PRIORITY title order, original title, choosen title. the title is selected from the first available:
  . langTitles [ LANGUAGE_PRIORITY.index(lang) ] is the serie (main or original) or episode title, in a language selected
  . langTitles [ len(LANGUAGE_PRIORITY) ] is main title for serie OR episode title if it was empty but no language check, when no other title in selected language exist, a chinese serie for exemple
  . langTitles [ len(LANGUAGE_PRIORITY) +1] is the title selected according to the language order, so the first not empty from the above variables
 
i take main or official title only so i don't use a synonym or short if an official or main title exist. that is the desired feature
your solution would allow any official or main title not in the language priority to be inserted in langTitles [none] (since rank would not match) possibly adding it at the end...
 
Are you saying for other languages ('ja' or 'zh-Hans'), a title can exist without main or official title on anidb?
Could you please tell me what was happening before the modification, and on which serie?
That way i can look at the anidb xml for the title and make sure nothing gets broken, and update the source on github...