[Rel] HTTP Anidb Metadata Agent (HAMA)

I got it working.

Thanks a lot! :slight_smile:

The hama readme whose link is in my signature contained: I did change the metadata id from the Anidb ID to “anidb-xxxxx” with xxxxx being the anidbid. You can use anidb.id file in series or Series/Extras folder or in the serie name " [anidbid-xxxxx]" at the end of serie folder name, works also for tvdb " [tvdb-xxxxxxx]". Older agents before that need to re-create the library to have a metadata.id beginning with “anidb-”

I have found a major performance issue with the new alpha scanner. I have noticed something occurring since I updated to the alpha to this day. Every anime I have added since that day has a message pop up saying ‘Finished processing ‘X’’ during the scan, and only those anime. Everything added before the alpha was updated doesn’t have this problem and seemingly scans pretty fast.

I point this out because recently I updated my entire collection, enabled the ‘Forced’ flag for Signs/Songs subs so it would be selected by default in Plex. Now when I scan, every dual-audio anime is rescanned and ‘processed’.

The interesting thing is that its done in reverse order from my newest addition to my oldest addition (the processing)

Is there some sort of cache I can delete that would reset this problem? I know that part of the problem is that I have ~3000 files, but before the alpha update I had at least ~2200 files. Unless the speed cost is massively exponential, I am puzzled at why the scanner is slowing down progressively.

The one thing I can’t do is just reset the scanner (wipe it, start fresh). With 173 different anime and all of them using custom PNG (better downscaling) backgrounds/posters, it’s not an option to just wipe the metadata.

Update:
After a couple restarts, it doesn’t process every single file anymore (huge speed boost). However, the ‘scanning’ issue remains for completely new items (not edited ones) added since I started using the alpha scanner.

Also, some news:
http://forum.kodi.tv/showthread.php?tid=142835&pid=2148599#pid2148599

Split-Cour anime should work now (the Fate/stay night issue I posted about a while back), I think HAMA needs an update to get the info though (new offsets)

Ugh. I’m an ex-software developer and I cannot make heads or tails on how to actually install this. :frowning:

When I grabbed the files off of github, I don’t see a Hama.bundle folder, or anything. In my plex directory, I don’t see a plug-in support folder. My plugins folder is named: “Plug-ins-6833552” and I am just absolutely lost. I was hoping this would be as easy as me downloading the git repo, plopping that into the plex folder, rebooting PMS and selecting the Hama agent but I can’t even find any logs of an error even occurring. :frowning:

If someone can help me out, please do so! I’ve got about 200 anime shows/movies I want to add to Plex, on its own channel.

@AquaJew: try installing another agent. If that doesn’t work it is not a pb with my agent. Did you have a look at my package release here?
@The Fire Kahuna: speed is exponential especially with files at root or grouping folders only my scanners support albeit with no optimisation. I created alpha to improve speed but behaviour changed so much that i wanted ti jeep things separate in case i had to go back. Is alpha better thsn the other one speed wise?
I need to implement new offsets.

It seems that after that error disappeared things have definitely improved. It’s just odd that whenever I scan, at the bottom it pops up saying ‘Scanning thisanime’ for every anime I have added since I updated to the alpha (and never for ANY that I have added before the alpha).

The alpha is definitely still faster at 174 anime than the older one at 110 anime.

Will be nice to have all my split-cour anime have metadata.

I believe that popup is normal, and restored by the alpha scanner
 the previous one added all while on root folder call so this was broken

The alpha possibly need the library recreated and plex cache could be affected since i change totally the way the folders are called, ie in their respective scanner call instead of root folder to use plex caching and scanner folder real time popup


@ZeroQI said:
AquaJew: try installing another agent. If that doesn’t work it is not a pb with my agent. Did you have a look at my package release here?

I figured it out. Here’s my explanation:

When you go to git, you can either Download ZIP or clone the repo. I had downloaded the zip, then tried to follow previous instructions to set it up, which didn’t work. What I had to do is go to my plugins folder where all the ******.bundle files were, create a new Hama.bundle folder, and unzip everything in there. Then I just rebooted my PMS and everything worked fine. This was incredibly simple, but very difficult to find a solution for. I just happened to notice the name of the zip file matched the folder structure inside.

Is it possible to put this in the readme file, to help n00bs like me?

The readme state the “Hama.bundle” folder goes inside “Plug-ins” folder, and also to download the zip package on this thread. The package itself from github is missing the data folder so will probably not show posters, and work hand in hand with my scanner anyway, hence the fact i release a zip package with the agent and agent data folders, and scanner in their respective folder to avoid such issues, and this zip package is mentioned in the read-me in the install section on the very first line:

Get the latest zip package in (https://forums.plex.tv/discussion/77636/release-http-anidb-metadata-agent-hama#latest).
Archive folders to copy in Plex main folder:

    * "Scanners"         "Scanners" is the only that has to be created. "Series/Absolute series Scanner.py" goes inside. 
    * "Plug-ins"         Hama agent "Hama.bundle" folder goes inside
    * "Plug-ins support" Agent data folders (com.plexapp.agents.hama/DataItems/Anidb|OMDB|plex|TMDB|TVDB) goes inside
    * "Logs"             "X-Plex-Token.id"      Put from an item view xml the url token inside to have a log per library
                         "no_timestamp"         delete to have timestamps in logs)
                         "keep_zero_size_files" delete to have Plex skip empty files)

Yes you might have to search the last 5 pages of the thread to get it, but it is the easiest.
i will not amend the readme as i believe it wasn’t followed in this case, but thanks for documenting the answer, it is to your credit. I do update the readme when i feel something is missing, and release a new package when i update the agent. an new update will be done shortly for the changes in the mapping files but i am lacking a bit of time to do it promptly.

I’ve searched through the past several pages of posts, and the initial post of the thread, but I can’t seem to find the current release archive. The Github readme says to look here for the latest package, where is it?
*Edit: Nevermind, found it after paging back some more. Hard to ID it as the “This is the current release!” post. Might I suggest editing the first post in the thread to always have the current link?

2015-08-04 https://forums.plex.tv/discussion/77636/release-http-anidb-metadata-agent-hama/p1
2015-08-31 https://forums.plex.tv/discussion/comment/1009167/#Comment_1009167
Have created a folder package for plugin data folders so you can dl on github the code, but the big zip with all seem to be the simplest. from now on will upload on the first post

cool nick, seem like a cross with worm’s explosive sheep and lemmings


I am trying to figure out what I’m doing wrong, I cannot get the agent to show up in the options. I tried installing a different agent and it showed up. I followed the directions in the ReadMe for adding all the folders and logs but nothing. I have restarted PMS and the entire computer several times. Permissions seem to be in order. I’m running Plex under OpenMediaVault (Debian). Any suggestions would be very much appreciated. The scanner seems to work great though, nice work. I’d post logs, but I’m not sure what is useful in this case.

If the agent don’t show Hama.bundle folder is wrong or the code saved as html or permission issue. Use my zip archive posted here and if doesn’t work and you put the Hama.bundle in plugins folder it’s a permission issue

You’re right, it was permissions, always a snag with Linux. for anybody else who has the issue run the command after placing all the files in the Plex folder.

sudo chmod 775 -R /var/lib/plexmediaserver

Thanks for trying another agent and documenting the fix. i have added the command to the readme on github

Just wanted to thank you ZeroQI. You did some really good work here!

Thx, ZeroQI. I have been messing around all morning until I found this and it fixed everything.

Guess I was wrong. Some stuff worked better and I lost others. I wonder if its because I moved my plex server to a different drive. I might just need to start over.

re-create the library, but you can leave agent data folder. should work