AniDB metadata agent

Hi,

I have a problem and can't figure out what it is. A series won't fetch any data. The Log shows this:

2014-07-27 12:27:07,100 (73c6f490) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.anidb/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo0CnMyCmVuczQKbGFuZ3M3ClRWX1■■■3dzMTAKbWVkaWFfdHlwZWIwczYKbWFudWFscjEKczYKa3dhcmdzOQpzMTYKZTcyZmFkNWZkN2ExYzYxOXMxNwpvcGVuU3VidGl0bGVzSGFzaHMyCjEyczcKZXBpc29kZXMxCjFzOAplcGlzb2RpY3MyNgpBZXN0aGV0aWNhIG9mIGEgUm9ndWUgSGVyb3M0CnNob3dzMQoxczYKc2Vhc29uczEzMwolMkZzaGFyZSUyRk1EMF9EQVRBJTJGTXVsdGltZWRpYSUyRkFuaW1lJTJGQWVzdGhldGljYSUyME9mJTIwQSUyMFJvZ3VlJTIwSGVybyUyRkFlc3RoZXRpY2ElMjBPZiUyMEElMjBSb2d1ZSUyMEhlcm8lMjAtJTIwUzAxRTEyJTJFbWt2czgKZmlsZW5hbWVzNDAKOGMzMGUwMTcyYzIxYzIzMjc4NDFjNTc5YmVlYmM4MmY4NTI0Mjc4Y3M4CnBsZXhIYXNoczcKMTM5MjA2NHM4CmR1cmF0aW9uczQKMzczNnMyCmlkcjAK
2014-07-27 12:27:07,115 (73c6f490) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.anidb/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo0CnMyCmVuczQKbGFuZ3M3ClRWX1■■■3dzMTAKbWVkaWFfdHlwZWIwczYKbWFudWFscjEKczYKa3dhcmdzOQpzMTYKZTcyZmFkNWZkN2ExYzYxOXMxNwpvcGVuU3VidGl0bGVzSGFzaHMyCjEyczcKZXBpc29kZXMxCjFzOAplcGlzb2RpY3MyNgpBZXN0aGV0aWNhIG9mIGEgUm9ndWUgSGVyb3M0CnNob3dzMQoxczYKc2Vhc29uczEzMwolMkZzaGFyZSUyRk1EMF9EQVRBJTJGTXVsdGltZWRpYSUyRkFuaW1lJTJGQWVzdGhldGljYSUyME9mJTIwQSUyMFJvZ3VlJTIwSGVybyUyRkFlc3RoZXRpY2ElMjBPZiUyMEElMjBSb2d1ZSUyMEhlcm8lMjAtJTIwUzAxRTEyJTJFbWt2czgKZmlsZW5hbWVzNDAKOGMzMGUwMTcyYzIxYzIzMjc4NDFjNTc5YmVlYmM4MmY4NTI0Mjc4Y3M4CnBsZXhIYXNoczcKMTM5MjA2NHM4CmR1cmF0aW9uczQKMzczNnMyCmlkcjAK
2014-07-27 12:27:07,123 (73c6f490) :  INFO (agentkit:915) - Searching for matches for {'openSubtitlesHash': 'e72fad5fd7a1c619', 'episode': '12', 'episodic': '1', 'show': 'Aesthetica of a Rogue Hero', 'season': '1', 'filename': '%2Fshare%2FMD0_DATA%2FMultimedia%2FAnime%2FAesthetica%20Of%20A%20Rogue%20Hero%2FAesthetica%20Of%20A%20Rogue%20Hero%20-%20S01E12%2Emkv', 'plexHash': '8c30e0172c21c2327841c579beebc82f8524278c', 'duration': '1392064', 'id': '3736'}
2014-07-27 12:27:07,131 (73c6f490) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/3736/tree'
2014-07-27 12:27:07,301 (73c6f490) :  INFO (__init__:82) - Connection exception, msg: [Errno 5] Input/output error
2014-07-27 12:27:07,308 (73c6f490) :  CRITICAL (agentkit:931) - Exception in the search function of agent named 'AniDB', called with keyword arguments {'openSubtitlesHash': 'e72fad5fd7a1c619', 'episode': '12', 'episodic': '1', 'show': 'Aesthetica of a Rogue Hero', 'season': '1', 'filename': '%2Fshare%2FMD0_DATA%2FMultimedia%2FAnime%2FAesthetica%20Of%20A%20Rogue%20Hero%2FAesthetica%20Of%20A%20Rogue%20Hero%20-%20S01E12%2Emkv', 'plexHash': '8c30e0172c21c2327841c579beebc82f8524278c', 'duration': '1392064', 'id': '3736'} (most recent call last):
  File "/share/MD0_DATA/.qpkg/PlexMediaServer/Library/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 924, in _search
    agent.search(results, media, lang)
  File "/root/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 291, in search
    self.doSearch(results, media, lang)
  File "/root/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 212, in doSearch
    connection = self.connect()
  File "/root/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 83, in connect
    raise e
IOError: [Errno 5] Input/output error

2014-07-27 12:27:07,321 (73c6f490) : DEBUG (runtime:918) - Response: [200] str, 16 bytes

Not sure what it could be, seeing as it seems to be an I/O error. Does this happen for a specific series repeatedly? Other series/movies works, but this one fails - all the time? Have you used manually matching, or is the default agent for the section?

Any particular reason there are no posters or thumbnails generated when I use this? 

EDIT:

n/m, switched to Hama which works.

Not sure what it could be, seeing as it seems to be an I/O error. Does this happen for a specific series repeatedly? Other series/movies works, but this one fails - all the time? Have you used manually matching, or is the default agent for the section?

Hi,

sorry for the very late reply, but wasn't really at home a long time due to holiday and work. I just updated to the newest version of plex and everything seems fine now. Thanks anyway.

Best regards

I can not get this to pick stuff up that is on AniDB.net

I used file bot to name the files from AniDB. 

I have also changed the file name to S01E01 (just to test it)

this is what I get

Ok, same question as always, can you please upload the logs, otherwise it's hard to troubleshoot? Check https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files for location, and lookup under PMS Plugin Logs for the anidb agent log.

sorry for not posting logs. Here is my log file.

I cant add the other log files. so hope this is the right one.

sorry for not posting logs. Here is my log file.

I cant add the other log files. so hope this is the right one.

From what I can tell there's no match. The name search needs to have exact name from aniDB, otherwise the matching will fail (there's no "close match" on the UDP API). I think you're missing the "H" in the anime title and both "mo" should be in lowercase (not sure if that's a must though).

A few gotcha’s:
- Search is done firstly by file hash (file must match the released files that AniDB lists) and secondly by name (name must exactly match that which is registered on AniDB). You can also search by aid (AniDB id) by specifying “aid:XXX” as name in the custom search dialog under “Fix incorrect match”.
- If you have a multi-season tv-show, you should either keep them as separate shows or use absolute numbering, as AniDB has no notion of seasons, just shows. For example, you should avoid a season 2 folder with episode no 1 - that will be overwritten with metadata for season 1 ep 1
- Slow

Is it possible to figure out the episode number for seasons > 1?

Get the last episode of S01 and then add it to the episode number of the current season:

eg.

S01E01

...

S01E23

S02E01

S02E02

S02E01 becomes 23+1 = 24

S02E02 becomes 23+2 = 25

All this information can be obtained from the library and if it's incomplete, will fail anyway with the current implementation since S02 will overwrite S01.

Is it possible to figure out the episode number for seasons > 1?

Get the last episode of S01 and then add it to the episode number of the current season:

eg.

S01E01

...

S01E23

S02E01

S02E02

S02E01 becomes 23+1 = 24

S02E02 becomes 23+2 = 25

All this information can be obtained from the library and if it's incomplete, will fail anyway with the current implementation since S02 will overwrite S01.

I guess it could be done, but it would be a bit confusing since aniDB does not use seasons. Why would you want to do this instead of using absolute numbering?

I guess it could be done, but it would be a bit confusing since aniDB does not use seasons. Why would you want to do this instead of using absolute numbering?

Some people release anime like this, saves me from having to rename everything.

Some people release anime like this, saves me from having to rename everything.

Hmm, ok, let me have a think about it just to make sure that I don't introduce any other pitfalls. AniDB's API is very picky so I don't know if asking for non-existant episodes too many might eventually lead to account blocking or similar. Shouldn't be a big issue though, but seeing as most people don't read disclaimers they'll whine about it if it doesn't work.

Hi

I did a search on this topic for freenas/free bsd and got none so I'll go ahead and post, then go through the replies for hints.

Basically I can't the plugin working. It doesn't show up under Settings/Agents to enable.

I have a freenas setup and using the PlexMediaServer plugin from there, it runs from its own jail, I dropped the Anidb.bundle into /usr/local/share/plexmediaserver/Resources/Plug-ins . The TVDB.bundle plugin is also there so I think I'm in the right place.

Anyone else had luck with this? I'm not sure how plex's plugin works whether it's independent of OS or not.

Thanks.

I got it fixed myself. Just for reference in case anyone else with a FreeNAS 9.2.5 setup run into this, the folder is actually at /usr/pbi/plexmediaserver-amd64/plexdata/Plex\ Media\ Server/Plug-ins/ from the jail's home.

Add the pre-fix necessary if you're going in from the FreeNAS root.

Tip.

I spent hours trying to get this agent to work, then i got tired searched some more and found the Hama agent, it worked right out of the box for my large anime collection.

https://forums.plex.tv/topic/77636-release-http-anidb-metadata-agent-hama/

Tip.

I spent hours trying to get this agent to work, then i got tired searched some more and found the Hama agent, it worked right out of the box for my large anime collection.

https://forums.plex.tv/topic/77636-release-http-anidb-metadata-agent-hama/

Well, if you had problems you could've asked for help. Not sure what issues you had, but I just installed on a clean installation of Plex and it worked. Good luck with the HAMA agent.

Can an option be added for scraping unofficial \ synonymous titles in addition to official regional titles?

As it is now, if season 1 of a show has an official title and season 2 doesn’t, they won’t be appearing next to each other in the library. Season 1 will be displayed under its English title while season 2 — under romanized version of the original Japanese title.

I’m having trouble with a couple shows where AniDB recognizes the second ‘season’ as a separate show (i.e. SAO 2) but the agent isn’t picking it up. The file naming and the like is there (filebot named, I checked several manually), but it’s not registering.

The agent is correctly named for the library and all that, so…what’d I do wrong?

@Veranscoto said:
I’m having trouble with a couple shows where AniDB recognizes the second ‘season’ as a separate show (i.e. SAO 2) but the agent isn’t picking it up. The file naming and the like is there (filebot named, I checked several manually), but it’s not registering.

The agent is correctly named for the library and all that, so…what’d I do wrong?

SAO 2 is an exception to “standard” naming because they released it as a completely separate title, not just a second season (at least according to most databases). The solution is silly. Keep SAO and SAO 2 in separate folders both in the root of your collection. It will fix itself instantly.

I just found this one and tried it out, and so far it’s working wonderfully for me (probably in part due to me only using files that are logged on aniDB). I was wondering two things:

  1. Is it still actively being developed?
  2. Considering it already uses an API that requires a login, is it technically possible to sync the watch state in Plex with the watch state on aniDB?

Thanks for making this. its a real lifesaver. Thought how come it doesn’t do Multi Season stuff? To me personally it makes things a lot more neat and tidy