AniDB metadata agent

Ok, once again, it's not the agents responsibility to find and parse the video files, that's up to the scanner. The agent merely supplies metadata for any show or movie identified.

im currently using plex series scanner, agent anidb.

do you think i have to use plex movies scanner and use anidb. will it picks up my anime series as well as anime movies?

if not, how other people managed to see anime movies on their plex?

im currently using plex series scanner, agent anidb.

do you think i have to use plex movies scanner and use anidb. will it picks up my anime series as well as anime movies?

if not, how other people managed to see anime movies on their plex?

You have to separate the tv shows and movies and put them in separate sections with the correct type (tv and movies respectively). I think quite a few have this working without issues.

You have to separate the tv shows and movies and put them in separate sections with the correct type (tv and movies respectively). I think quite a few have this working without issues.

alright. i prefer to have all animes (series and movies) in one group, anime.. but if thats the case i will try.

i was confused since seeing in page one as "Supports both movies and tv-shows" but yes i got it now. scanner do the scanning, and agent supllies data. if scanner only can find series then it is scanner fault/incorrect choice of scanner.

alright. i prefer to have all animes (series and movies) in one group, anime.. but if thats the case i will try.

i was confused since seeing in page one as "Supports both movies and tv-shows" but yes i got it now. scanner do the scanning, and agent supllies data. if scanner only can find series then it is scanner fault/incorrect choice of scanner.

The split between tv shows and movies is a founding principle of Plex. Like it or not, if you want to use Plex to the fullest, you have to accept that.

The split between tv shows and movies is a founding principle of Plex. Like it or not, if you want to use Plex to the fullest, you have to accept that.

agree. actually this is the same principle as  movie (cinema) and tv show.. they are indeed different. thanks again.

Edit: Never mind, seems to be a temporary issue. 

Unfortunately, this seems to be broken in the latest plex server release. 

Define "latest"? I'm not a PlexPass user, the latest I have to test with is (and what I use daily) is 0.9.8.17.282-c844f09 and it works ok with that. What do you see in the log file for the agent? You'll find it here and the name is com.plexapp.agent.anidb.log.

Looking through my log files, looks like it was a timeout issue. Is there a rate limit on the anidb API that might have caused my ip to temporarily be blocked? Wondering if that might be the cause, since I recreated a category, which would have caused a large number of lookups (I used it as the default agent). 

Thanks for the fast response! I'll make sure I include version number and log excerpts in the future. 

Edit: Yeah, it looks like I'm getting the "banned" messages in the log. 

2013-12-28 16:32:29,530 (14dc) :  INFO (logkit:16) - Could not load anime data, msg: Not sending, banned

Looking through my log files, looks like it was a timeout issue. Is there a rate limit on the anidb API that might have caused my ip to temporarily be blocked? Wondering if that might be the cause, since I recreated a category, which would have caused a large number of lookups (I used it as the default agent). 

Thanks for the fast response! I'll make sure I include version number and log excerpts in the future. 

Edit: Yeah, it looks like I'm getting the "banned" messages in the log. 

2013-12-28 16:32:29,530 (14dc) :  INFO (logkit:16) - Could not load anime data, msg: Not sending, banned

AniDB's API has a lot of fuzzy limitations which seem to come in to play for quite a few users, mostly when doing a large scan (such as for a whole category). They're very secretive about how this works, so the only thing I can say is to try to do manual scans one at a time whenever you encouter this. Note that you might have to wait for a few hours (or a day) before doing another scan after getting banned, since you migh face permanent ban otherwise.

AniDB's API has a lot of fuzzy limitations which seem to come in to play for quite a few users, mostly when doing a large scan (such as for a whole category). They're very secretive about how this works, so the only thing I can say is to try to do manual scans one at a time whenever you encouter this. Note that you might have to wait for a few hours (or a day) before doing another scan after getting banned, since you migh face permanent ban otherwise.

Ban seems to have lasted for a day, but changing the default agent for the category back, and doing manual scans one-by-one like you suggested did the trick. Thanks!

Hello Fellow plex anime fans,

I have a simple question and im hoping to get some direction on resolving it. I have been using XBMC for years and have gotten used to making sure all my shows are synced with thetvdb and using absolute numbering. I have just started to use plex (mostly due to being able to watch from outside my network). My issue is that when displaying titles that have ovas and specials, plex creates a new season called Specials

seen here: 



Here is my file listing on my unraid server: fd4m6o.jpg

I am hoping there is a way to display them as 1 big list and maintain the order that appears in thetvdb since many ova's occur during a time frame either before or after a certain episode. 

Hello Fellow plex anime fans,

I have a simple question and im hoping to get some direction on resolving it. I have been using XBMC for years and have gotten used to making sure all my shows are synced with thetvdb and using absolute numbering. I have just started to use plex (mostly due to being able to watch from outside my network). My issue is that when displaying titles that have ovas and specials, plex creates a new season called Specials
...
I am hoping there is a way to display them as 1 big list and maintain the order that appears in thetvdb since many ova's occur during a time frame either before or after a certain episode. 

Unfortunately, no. Plex wants to handle them as specials, in season 00. See the paragraph Naming and Organizing TV Shows here.

I apologize for jumping in 14 pages late, but since the AniDB plugin will allow aid:### to override incorrect matches, will it look for that in the folder name? That might be a decent way to ensure everything gets brought in properly every time. For example, a folder called "Puella Magi Madoka Magica [aid=8069]" or similar would match immediately without any guesswork (and you could ignore the whole "Mahou Shoujo" vs "Puella Magi" issue).

Obviously not a big deal since you can just rematch a series with the aid, but it's always nice to know that should your Plex library need to be blown away, a simple rescan will get it all right the first time.

Well, this isn't too promising. :(

2014-01-10 17:32:53,158 (2d891470) :  DEBUG (runtime:915) - Response: [200] MediaContainer, 372 bytes
2014-01-10 17:33:00,651 (2d891470) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.anidb/prefs/set?username=&password=
2014-01-10 17:33:00,658 (2d891470) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.anidb/prefs/set
2014-01-10 17:33:00,662 (2d891470) :  DEBUG (preferences:198) - Saved the user preferences
2014-01-10 17:33:00,664 (2d891470) :  CRITICAL (sandbox:301) - Function named 'ValidatePrefs' couldn't be found in the current environment
2014-01-10 17:33:00,669 (2d891470) :  DEBUG (runtime:915) - Response: [200] str, 0 bytes
2014-01-10 17:33:16,685 (2d891470) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.anidb/prefs
2014-01-10 17:33:16,691 (2d891470) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.anidb/prefs
2014-01-10 17:33:16,701 (2d891470) :  DEBUG (runtime:915) - Response: [200] MediaContainer, 391 bytes
2014-01-10 17:33:28,590 (2ab5a000) :  INFO (pipeinterface:87) - Stopping plug-in

This is running on PMS on a Drobo 5N.

EDIT: Odd, it seems to work despite the ValidatePrefs error above. I notice it doesn't seem to look at folder names at all and just goes on the file names. A bit more work to get stuff to import, but I can handle it. I may see if I can tweak the code to ignore "The Animation" in titles as it's common and yet utterly redundant, so I removed it from all of my files.

EDIT2: Argh, it seems to require that both the folder and the file name match perfectly. More work. Grumble.

EDIT3: Wow, got one item added in, and now all I can seem to get are hangs here:

2014-01-10 18:46:46,963 (2f193470) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/1493/tree'

EDIT4: And then it crashed Plex Media Server. Restarted and tried to refresh and got:

2014-01-10 18:52:40,552 (2d971470) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/1493/tree'
2014-01-10 18:52:40,586 (2d971470) :  WARNING (data:186) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting property name: line 8 column 9 (char 207)
2014-01-10 18:52:40,601 (2d971470) :  DEBUG (preferences:256) - Loaded preferences from DefaultPrefs.json
2014-01-10 18:52:40,623 (2d971470) :  DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.agents.anidb
2014-01-10 18:52:40,629 (2d971470) :  DEBUG (runtime:1141) - Scheduled a timed thread named 'checkConnection'
2014-01-10 18:52:40,631 (2d971470) :  INFO (__init__:74) - Connection exception, msg: [Errno 5] Input/output error
2014-01-10 18:52:40,636 (2d971470) :  CRITICAL (agentkit:931) - Exception in the search function of agent named 'AniDB', called with keyword arguments {'openSubtitlesHash': 'Redacted', 'episode': '2', 'episodic': '1', 'show': 'Redacted', 'season': '1', 'filename': '%2Fmnt%2FDroboFS%2FShares%2FDante%2FVideo%2FUnsorted%2FPlex-Test%2FRedacted%2FRedacted%20-%2002%2Emkv', 'plexHash': 'Redacted', 'duration': '-1', 'id': '1493'} (most recent call last):
  File "/mnt/DroboFS/Shares/DroboApps/plex/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 "/mnt/DroboFS/Shares/DroboApps/plex/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 283, in search
    self.doSearch(results, media, lang)
  File "/mnt/DroboFS/Shares/DroboApps/plex/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 205, in doSearch
    connection = self.connect()
  File "/mnt/DroboFS/Shares/DroboApps/plex/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 75, in connect
    raise e
IOError: [Errno 5] Input/output error

2014-01-10 18:52:40,642 (2d971470) : DEBUG (runtime:915) - Response: [200] str, 16 bytes

I apologize for jumping in 14 pages late, but since the AniDB plugin will allow aid:### to override incorrect matches, will it look for that in the folder name? That might be a decent way to ensure everything gets brought in properly every time. For example, a folder called "Puella Magi Madoka Magica [aid=8069]" or similar would match immediately without any guesswork (and you could ignore the whole "Mahou Shoujo" vs "Puella Magi" issue).

Obviously not a big deal since you can just rematch a series with the aid, but it's always nice to know that should your Plex library need to be blown away, a simple rescan will get it all right the first time.

The agent has no control over how the filenames are parsed, that's the scanners job. Your suggestion wouldn't work though, as those things are always removed by the scanner when it's trying to make sense of filenames (at least all my files with [yyy] in the gets handled that way).

Well, this isn't too promising. :(

2014-01-10 17:32:53,158 (2d891470) :  DEBUG (runtime:915) - Response: [200] MediaContainer, 372 bytes
2014-01-10 17:33:00,651 (2d891470) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.anidb/prefs/set?username=&password=
2014-01-10 17:33:00,658 (2d891470) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.anidb/prefs/set
2014-01-10 17:33:00,662 (2d891470) :  DEBUG (preferences:198) - Saved the user preferences
2014-01-10 17:33:00,664 (2d891470) :  CRITICAL (sandbox:301) - Function named 'ValidatePrefs' couldn't be found in the current environment
2014-01-10 17:33:00,669 (2d891470) :  DEBUG (runtime:915) - Response: [200] str, 0 bytes
2014-01-10 17:33:16,685 (2d891470) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.anidb/prefs
2014-01-10 17:33:16,691 (2d891470) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.anidb/prefs
2014-01-10 17:33:16,701 (2d891470) :  DEBUG (runtime:915) - Response: [200] MediaContainer, 391 bytes
2014-01-10 17:33:28,590 (2ab5a000) :  INFO (pipeinterface:87) - Stopping plug-in

This is running on PMS on a Drobo 5N.

EDIT: Odd, it seems to work despite the ValidatePrefs error above. I notice it doesn't seem to look at folder names at all and just goes on the file names. A bit more work to get stuff to import, but I can handle it. I may see if I can tweak the code to ignore "The Animation" in titles as it's common and yet utterly redundant, so I removed it from all of my files.

EDIT2: Argh, it seems to require that both the folder and the file name match perfectly. More work. Grumble.

EDIT3: Wow, got one item added in, and now all I can seem to get are hangs here:

2014-01-10 18:46:46,963 (2f193470) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/1493/tree'

EDIT4: And then it crashed Plex Media Server. Restarted and tried to refresh and got:

2014-01-10 18:52:40,552 (2d971470) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/1493/tree'
2014-01-10 18:52:40,586 (2d971470) :  WARNING (data:186) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting property name: line 8 column 9 (char 207)
2014-01-10 18:52:40,601 (2d971470) :  DEBUG (preferences:256) - Loaded preferences from DefaultPrefs.json
2014-01-10 18:52:40,623 (2d971470) :  DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.agents.anidb
2014-01-10 18:52:40,629 (2d971470) :  DEBUG (runtime:1141) - Scheduled a timed thread named 'checkConnection'
2014-01-10 18:52:40,631 (2d971470) :  INFO (__init__:74) - Connection exception, msg: [Errno 5] Input/output error
2014-01-10 18:52:40,636 (2d971470) :  CRITICAL (agentkit:931) - Exception in the search function of agent named 'AniDB', called with keyword arguments {'openSubtitlesHash': 'Redacted', 'episode': '2', 'episodic': '1', 'show': 'Redacted', 'season': '1', 'filename': '%2Fmnt%2FDroboFS%2FShares%2FDante%2FVideo%2FUnsorted%2FPlex-Test%2FRedacted%2FRedacted%20-%2002%2Emkv', 'plexHash': 'Redacted', 'duration': '-1', 'id': '1493'} (most recent call last):
  File "/mnt/DroboFS/Shares/DroboApps/plex/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 "/mnt/DroboFS/Shares/DroboApps/plex/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 283, in search
    self.doSearch(results, media, lang)
  File "/mnt/DroboFS/Shares/DroboApps/plex/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 205, in doSearch
    connection = self.connect()
  File "/mnt/DroboFS/Shares/DroboApps/plex/Library/Plex Media Server/Plug-ins/AniDB.bundle/Contents/Code/__init__.py", line 75, in connect
    raise e
IOError: [Errno 5] Input/output error

2014-01-10 18:52:40,642 (2d971470) : DEBUG (runtime:915) - Response: [200] str, 16 bytes

Try to restart Plex server completely and do a manual match, does that get you the same error as your last one above? If so, is your Drobo able to connect to the internet properly?

I finally got it to add a few shows, but I have to restart PMS after every couple, as something is killing PMS entirely. I won't have a chance to get back to this for a while, but it seems to me more of a PMS bug.

A shame that certain information is tossed away by the scanner before being handed off to the agent. You'd think that it could give you "here's what I made of it", as well as the raw data in case the agent knows better. But if that's not the way it's designed, it's kind of moot. :)

I finally got it to add a few shows, but I have to restart PMS after every couple, as something is killing PMS entirely. I won't have a chance to get back to this for a while, but it seems to me more of a PMS bug.

A shame that certain information is tossed away by the scanner before being handed off to the agent. You'd think that it could give you "here's what I made of it", as well as the raw data in case the agent knows better. But if that's not the way it's designed, it's kind of moot. :)

Well, I guess the agent could parse the filename and extract information from that, but so far there's been no need so I haven't looked into it. If you find anything crash-wise related to the agent let me know.

I finally got it to add a few shows, but I have to restart PMS after every couple, as something is killing PMS entirely. I won't have a chance to get back to this for a while, but it seems to me more of a PMS bug.

A shame that certain information is tossed away by the scanner before being handed off to the agent. You'd think that it could give you "here's what I made of it", as well as the raw data in case the agent knows better. But if that's not the way it's designed, it's kind of moot. :)

I just started trying to use this agent and it is killing my whole plex server as well.  whenever it starts scanning and downloading metadata the whole server crashes.  I have to stop and restart the server.  any ideas what could be causing this?  thanks!

forgot to mention... running unRAID and latest plexpass version.

I just started trying to use this agent and it is killing my whole plex server as well.  whenever it starts scanning and downloading metadata the whole server crashes.  I have to stop and restart the server.  any ideas what could be causing this?  thanks!

forgot to mention... running unRAID and latest plexpass version.

Do you get anything in the logs? Check both server log and agent log and see if you find anything suspicious when the server crashes, post them here if you want me to have a look. I'm running the latest free version on Debian Linux, not sure if there's a difference between that and the latest PlexPass version?