[Rel] HTTP Anidb Metadata Agent (HAMA)

I'm having issues getting HAMA to work on my Freenas box.  I have Plex installed via the Freenas plugins, so it is sitting in its own jail (or thin OS).  I'm looking through the logs and I don't ever see an error message for hama, but I do see the following:

Jul 06, 2014 22:28:30 [0x808239800] DEBUG - Request: [127.0.0.1:17850] GET /:/plugins/com.plexapp.agents.hama (5 live)
Jul 06, 2014 22:28:30 [0x808239800] WARN - Request for plug-in [com.plexapp.agents.hama] but it doesn't exist.
....
Jul 06, 2014 22:28:30 [0x80949f400] DEBUG - [com.plexapp.agents.hama] Agent not known by system, so we're starting for sure.
Jul 06, 2014 22:28:30 [0x80949f400] DEBUG - Starting file watcher for com.plexapp.agents.hama
Jul 06, 2014 22:28:30 [0x80949f400] DEBUG - Spawned plug-in com.plexapp.agents.hama with PID 88301
Jul 06, 2014 22:28:30 [0x80949f400] DEBUG - [com.plexapp.agents.hama] Sending command: GET /:/prefixes
....
Jul 06, 2014 22:31:30 [0x80949f400] ERROR - Timeout or error reading status line from plug-in pipe [com.plexapp.agents.hama], we're killing it.
Jul 06, 2014 22:31:30 [0x80949f400] DEBUG - Stopping [com.plexapp.agents.hama].
Jul 06, 2014 22:31:30 [0x80949f400] DEBUG - [com.plexapp.agents.hama] Killing.
Jul 06, 2014 22:31:30 [0x80949f400] ERROR - Error received reading configuration for com.plexapp.agents.hama
Jul 06, 2014 22:31:30 [0x80949f400] DEBUG - Stopping [com.plexapp.agents.hama].

Has any one dealt with this before?  I'm kinda stuck on where to go from here...  There are no log files in PMS Plugin Logs.

Did you install another agent and it is working by any chance?

Could you restart plex, and attach:

   . Logs/Plex Media Server.log

   . Logs/PMS Plugin Logs/com.plexapp.agents.hama.log (if present)

What is the zip filename you have used or place you got hama from?

where did you put the bundle folder? If it is in the agents folder, does the folder structure look the same as the other agents?

It should be mainly:

  . Plug-ins/Hama.bundle/contents/DefaultPrefs.json

  . Plug-ins/Hama.bundle/contents/code/__init__.py

Don't forget creating the folders by hand in Plug-in SUpport / Data / com.plexapp.agents.hama/DataItems as per the read-me link in my signature

From S-BABS thread: 

For HAMA:

   . "JoJo's Bizarre Adeventure" => "Jojo's Bizarre Adventure (2012)" [aid:9304], or "JoJo's Bizarre Adventure" [aid:788]? did you try to search the right serie or to put "aid:xxxxx" in the search with xxxxx being the anidbid ?

   . Hellsing Ultimate: did you leave the roman numbering in the file name? if so, it shouldn't pass the scanner.

Can you post in the right Hama thread the filenames and folder names for both series ?

I tried the aid:9304 search with Jojo and that seemed to correct it. Before it was getting the data from the 1993 ova's lol. With the aid search it finally got it right. For Hellsing Ultimate, I changed the roman numerals to s##e## when I was using tvdb awhile back since tvdb couldn't handle it either, it kept getting data from tv series instead and that's what HAMA does for me unless i add the aid:3296, too.

Did you install another agent and it is working by any chance

Nope.  HAMA is the first agent I have tried installing.

Could you restart plex, and attach:

   . Logs/Plex Media Server.log

   . Logs/PMS Plugin Logs/com.plexapp.agents.hama.log (if present)

Only the Plex Media Server.log file is there, no log file for hama found in PMS Plugin Logs.

https://www.dropbox.com/s/7jvg3sl6a2su35r/Plex%20Media%20Server.log

What is the zip filename you have used or place you got hama from?

Got it from the "Installation" section of the github page.

where did you put the bundle folder? If it is in the agents folder, does the folder structure look the same as the other agents?

The Hama.bundle folder is placed inside of "/mnt/Data/jails/plexmediaserver_1/usr/pbi/plexmediaserver-amd64/plexdata/Plex Media Server/Plug-ins".

Here is a pick on how it looks: 

https://www.dropbox.com/s/8trylxgzhy7igaa/Hama.bundle_Code.png

https://www.dropbox.com/s/slswbon888wg2f8/Hama.bundle_Contents.png

Don't forget creating the folders by hand in Plug-in SUpport / Data / com.plexapp.agents.hama/DataItems as per the read-me link in my signature

https://www.dropbox.com/s/7l6688bwqkxsryk/Hama_DataItems.png

All look good file wise. Thanks for documenting properly.

See if there is a Logs\PMS Plugin Logs and paste it. I can see hama doesn’t start but can’t see why and I would like to solve

I finally figured it out!  For one, the logs were located in a different folder for the plugins ( instead of in Logs/PMS Plugin Logs, it was in Library/Logs/PMS Plugin Logs.  https://www.dropbox.com/s/72o6jv8jlh3812p/plugin_logs.png  Probably based on that this is Freenas and not straight up Linux).  Once I found the log I was able to figure out that the directories I created in the Data folder were not owned by the Plex app user, so Plex was unable to create files in it.  Posted the log below for more info if you care!

https://www.dropbox.com/s/k98kq6afok2206p/com.plexapp.agents.hama.log

Thanks for the detailed reply. i didn't expect two logs folder: "Logs/PMS Plugin Logs" and "/Library/Logs/PMS Plugin Logs". To sum-up HAMA log was in:

 .../plexdata/Plex Media Server/Library/Logs/PMS Plugin Logs/com.plexapp.agents.hama.log

I am finishing my scanner that is meant to replace BABS [https://gist.github.com/ZeroQI/11b6036e16adb424b938], and next i will correct this folder issue so they are not mandatory anymore... They were meant to be optional, but clearly it's not the case. Please let me know if you have any issues

Wish it can include TheTVDB into Hama, because TheTVDB alone provides better information and fix the issue with multi Season animes + Special season as well.

Hama sometimes it does not provide background image, missing description or too short description compare to TheTVDB

All I can say the default Agents has better information..

It is an AniDB.Net agent net after all… I will code the use the tvdb when anidb description is missing, could put option to select favorite description.

I like anidb because recent series are often missing from the tvdb is aired only in Japan…


Please tell what is better than the default agent. Also there is a movie and Serie collection for multiple season anime…

It is an AniDB.Net agent net after all... I will code the use the tvdb when anidb description is missing, could put option to select favorite description.
I like anidb because recent series are often missing from the tvdb is aired only in Japan...

Please tell what is better than the default agent. Also there is a movie and Serie collection for multiple season anime...

It's not your fault if the information shows incorrectly, I must say. I agree that the fact AniDB sometimes cover early release anime from Japan. I had Hama cover them.

But this is just my nip-picking xD, Have a look as example:

TheTVDB

ZnzP707.jpg

AniDB

IQ0A7Ze.jpg

TheTVDB results:

iCLfotI.jpg

SrNDo01.jpg

The episodes are named properly in my opinion.

I get your point, and for this serie, that is correct, but if i search i could find a serie that makes the contrary argument

for example, "Alien cat cuties" is one title i don't want for anime... seasons for big series could be cool...

In my opinion, it comes down to what site has most of what you wants... and tvdb have english titles, seasons, no movies appart specials but no porn...

BY THE WAY HAMA fans.... I created a replacement for BABS. please create a category identical to the one you already have and configure it with this scanner. check if it creates  Plex Media Scanner Custom.log and point it to a folder with ending slash where it has write access like  "C:\_" or any other folder for example for windows 

filename = "/home/plex/" + filename
with open(filename, 'a')

Here is the link

https://forums.plex.tv/topic/113967-absolute-series-scanner-for-anime-mainly/

I'm currently using the AniDB Tagging System with these rules:

http://pastebin.com/raw.php?i=MkswMaME

Is that going to be an issue when I scan with with this agent?

I believe not, theses are very clean rules and i use the same xml as AniDB mod agent for XBMC

I have a package with the agent and a scanner i wrote here: https://forums.plex.tv/topic/113967-absolute-series-scanner-for-anime-mainly/page-2

Hello, I've been using the latest HAMA (2014-07-22 01h42 HAMA + Absolute Series Scanner) and had some problems with it. The scanner is working great however.

Firstly, it keeps banning me from AniDB using HAMA. I've attempted 4 days in a row now and each time it bans me after exactly 160 Anime scans. The second time I set SECONDS_BETWEEN_REQUESTS = 4, then I set it to 8 and finally I set it to 12. Each time I get banned after 160 entries, Also even though I set that value highier, I still noticed in the HAMA log, searching for "Requesting 'http://api.anidb.net:9001..." that sometimes it is still requesting 3 requests a second... I.E. it doesn't seem to be honouring the 1 request per 15 second rule. (Maybe something with threading?). 

Also when you do get banned, it throws a CRITICAL error:

2014-07-21 17:34:52,035 (1b0) :  INFO (logkit:16) - urlLoadXml - XML issue, result: Banned
2014-07-21 17:34:52,036 (1b0) :  ERROR (logkit:22) - parseAniDBXml - AniDB Serie XML: Exception raised
2014-07-21 17:34:52,038 (1b0) :  CRITICAL (core:572) - Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://791?lang=en' (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 970, in _update
    agent.update(obj, media, lang, force)
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 1028, in update
    def update(self, metadata, media, lang, force ): self.parseAniDBXml(metadata, media, lang, force,  False )
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 601, in parseAniDBXml
    elif "s"+defaulttvdbseason+"e"+str(epNumVal) in tvdb_table: summary = tvdb_table ["s"+defaulttvdbseason+"e"+str(epNumVal)] ['Overview']
ValueError

Also occasionally, it will also throw another critical error... NoneType has no attribute date:

2014-07-23 16:20:40,061 (4e8) :  DEBUG (logkit:13) - getMainTitle - LANGUAGE titles: ['Chrno Crusade', 'Chrno Crusade', 'Chrono Crusade', 'Chrno Crusade']
2014-07-23 16:20:40,270 (e64) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0Fn...
2014-07-23 16:20:40,276 (e64) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0Fn...
2014-07-23 16:20:40,279 (e64) :  INFO (agentkit:915) - Searching for matches for {'openSubtitlesHash': '06c535301b67191a', 'episode': '1', 'name': None, 'episodic': '1', 'show': 'Clamp in Wonderland ', 'season': '1', 'filename': 'X%3A%5CAnime%5CClamp%20in%20Wonderland%20(1994)%5CClamp%20in%20Wonderland%20-%201%20-%20[HnK][LD][A59B4527]%2Eavi', 'plexHash': '23c5c2ae2149c92ccf4f020784971c1230fa9240', 'duration': '-1', 'id': '82147'}
2014-07-23 16:20:40,283 (e64) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/library/metadata/82147/tree'
2014-07-23 16:20:40,493 (464) :  DEBUG (networking:172) - Requesting 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=7938'
2014-07-23 16:20:40,631 (2f0) :  DEBUG (networking:172) - Requesting 'http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=1312'
2014-07-23 16:20:40,742 (a44) :  DEBUG (networking:172) - Requesting 'http://thetvdb.com/api/A27AD9BE0DA63333/series/248035/all/en.xml'
2014-07-23 16:20:40,990 (4e8) :  DEBUG (logkit:13) - === searchByName - End - =================================================================================================
2014-07-23 16:20:41,007 (9b8) :  DEBUG (logkit:13) - === searchByName - Begin - ================================================================================================
2014-07-23 16:20:41,010 (9b8) :  INFO (logkit:16) - SearchByName - Title: 'Chuu Bra!! ', name: 'None', filename: 'X%3A%5CAnime%5CChuu%20Bra!!%20(2009-2010)%5CChuu%20Bra!!%20-%2012%20-%20[mudabone][Blu-ray][CCE87AC9]%2Emkv', manual:'False'
2014-07-23 16:20:41,016 (4e8) :  DEBUG (runtime:918) - Response: [200] str, 628 bytes
2014-07-23 16:20:41,023 (9b8) :  DEBUG (logkit:13) - SearchByName - AniDB Tree presence check
2014-07-23 16:20:41,025 (9b8) :  DEBUG (logkit:13) - SearchByName - Local exact search
2014-07-23 16:20:41,062 (9b8) :  DEBUG (logkit:13) - SearchByName - exact search - checking title: 'Chuu Bra!! '
2014-07-23 16:20:41,296 (464) :  DEBUG (logkit:13) - urlLoadXml: Serie XML saved locally successfully
2014-07-23 16:20:41,299 (464) :  DEBUG (logkit:13) - urlLoadXml - url: http://api.anidb.net:9001/httpapi?request=anime&client=hama&clientver=1&protover=1&aid=7938, filename: AniDB/7938.xml
2014-07-23 16:20:41,302 (464) :  DEBUG (logkit:13) - getMainTitle - LANGUAGE titles: ['Aos', 'Aos', '', 'Aos']
2014-07-23 16:20:41,305 (464) :  DEBUG (logkit:13) - parseAniDBXml - AniDB title changed: 'Aos' original title: 'Aos'
2014-07-23 16:20:41,312 (464) :  CRITICAL (core:572) - Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://7938?lang=en' (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 970, in _update
    agent.update(obj, media, lang, force)
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 1028, in update
    def update(self, metadata, media, lang, force ): self.parseAniDBXml(metadata, media, lang, force,  False )
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 601, in parseAniDBXml
    elif "s"+defaulttvdbseason+"e"+str(epNumVal) in tvdb_table: summary = tvdb_table ["s"+defaulttvdbseason+"e"+str(epNumVal)] ['Overview']
AttributeError: 'NoneType' object has no attribute 'date'

Another another error sometimes:  TypeError...

2014-07-23 16:22:28,711 (f90) :  DEBUG (networking:172) - Requesting 'https://api.tmdb.org/3/movie/52242/images?api_key=7f4a0bd0bd3315bb832e17feda70b5cd'
2014-07-23 16:22:30,339 (df8) :  DEBUG (logkit:13) - getImagesFromTMDBbyIMDBID - https://api.tmdb.org/3/find/tt0261463?api_key=7f4a0bd0bd3315bb832e17feda70b5cd&external_source=imdb_id
2014-07-23 16:22:30,341 (df8) :  DEBUG (logkit:13) - getImagesFromOMDB - imdbid: 'tt0261463', url: 'http://www.omdbapi.com/?i=tt0261463'
2014-07-23 16:22:30,413 (df8) :  DEBUG (networking:172) - Requesting 'http://www.omdbapi.com/?i=tt0261463'
2014-07-23 16:22:31,140 (f90) :  CRITICAL (core:572) - Exception in the update function of agent named 'HamaTV', called with guid 'com.plexapp.agents.hama://2005?lang=en' (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 970, in _update
    agent.update(obj, media, lang, force)
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 1028, in update
    def update(self, metadata, media, lang, force ): self.parseAniDBXml(metadata, media, lang, force,  False )
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 601, in parseAniDBXml
    elif "s"+defaulttvdbseason+"e"+str(epNumVal) in tvdb_table: summary = tvdb_table ["s"+defaulttvdbseason+"e"+str(epNumVal)] ['Overview']
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 841, in getImagesFromTMDB
    except: Log.Debug("getImagesFromTBDB - adding pictrure failed")
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Hama.bundle\Contents\Code\__init__.py", line 822, in 
    max_average = max([(lambda p: p['vote_average'] or 5)(p) for p in tmdb_images_dict])
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 108, in 
    _getitem_           = lambda x, y: x.__getitem__(y),
TypeError: string indices must be integers

I've attached the log that shows the last 2 errors... and if u search for the requests in the log u can see it's sometimes requesting 2 entries per second, but on average 1 or 2 seconds per request... this was with the variable set to 12 per second.

So in summary:

1) The latest doesn't seem to be honouring the 2 seconds per request rule for AniB, and I get banned using it after 160 requests (even when changing the variable to 4/8/12).

2) After you get banned, you get lots of ValueErrors (above).

3) Occasionally you get a AttributeError and TypeError (above) (when you are not banned).

After I returned to the "Hama plugin bundle 2014-05-26 (fixed)" HAMA version, and this version I do not get banned with, and when I set the request value to 8... it seems to be honouring that value in the logs as well.

@Family_access: thanks a lot. That is single handedly the best bug report i have ever gotten 

i have been trying to improve threading and i created the issue and it was running concurrently 4 threads and banning quickly and couldn't narrow down why, but it took your email to realise issues started when i changed threading code. also the exact count is golden, so we now know how to custom tweak the delay between requests now.(well if getting banned after a single scan of over 160 series, increase delay by one second)

I had improved the code for banning already, so it uses the local cache if possible when present.

Also, the plex cache for my current code was keeping the hourly ban for 2 weeks :/

Also took take care of the date errors you reported.

I have a ghost poster issue to solve before publishing the new code, but that should be this week end.

Also cut down the length at (890 lines of code) should make it easier to maintain

Metadata was corrupted on disk. Even when recreating the library, the posters were recovered, including an empty one...

I deleted what was inside: \\NAS\Plex\Library\Application Support\Plex Media Server\Metadata\TV Shows

855 lines, an improvement over 1065 previously...(76kb to 65kb)

Please let me know any error in the logs along with the last line before the error

Any feedback at all? Any error in the agent logs? Missing posters?

Will made a change so if using more than 1 season it takes all info from the tvdb. Right now the first season info is always to anidb…

Do you have any improvement idea? Am thinking using the mapping file ids for population the collection field…

All the agent in a concentrated 833 lines of commented goodness, easy to read (well for me)

   . Repaired the threading, should work back

   . allow to use local cache if banned

   . season 2+ use thetvdb as data source

   . collections use all anidbid sharing the same tvdbid, and the related anime from anidb to complete the movie collection xml...

   . code cleanup and bugfixes

Please let me know what you think or how it performs (for example 471 series detected, 12 without posters and the folder name...).

A single error left after a full scan with imdb and tmdb (posters and fanarts :D)

If anybody knows how to prevent the error below, but it seems it is outside the agent control apparently

2014-07-28 21:56:22,829 (2dc00b) :  DEBUG (runtime:717) - Handling request GET /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKNwpzMgplbnM0CmxhbmdiMXM1CmZvcmNlbnMxMApwYXJlbnRHVUlEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczUKNjk5NzBzNApkYmlkczM4CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vNjQxMz9sYW5nPWVuczQKZ3VpZHM0CjY0MTNzMgppZHIwCg__
2014-07-28 21:56:22,832 (2dc00b) :  DEBUG (runtime:814) - Found route matching /:/plugins/com.plexapp.agents.hama/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKNwpzMgplbnM0CmxhbmdiMXM1CmZvcmNlbnMxMApwYXJlbnRHVUlEczcKVFZfU2hvd3MxMAptZWRpYV90eXBlczUKNjk5NzBzNApkYmlkczM4CmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hOi8vNjQxMz9sYW5nPWVuczQKZ3VpZHM0CjY0MTNzMgppZHIwCg__
2014-07-28 21:56:22,833 (2dc00b) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.hama://6413?lang=en
2014-07-28 21:56:22,838 (2dc00b) :  DEBUG (model:223) - Deserializing from /volume1/Plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/2/120983476392bafba3333e36fd4cc08a54b4556.bundle/Contents/com.plexapp.agents.hama/Info.xml
2014-07-28 21:56:22,935 (2d400c) :  DEBUG (model:218) - Serializing to /volume1/Plex/Library/Application Support/Plex Media Server/Metadata/TV Shows/9/7b5c9a4e976ca70bb22f3c997f32e13995a1c89.bundle/Contents/com.plexapp.agents.hama/Info.xml
2014-07-28 21:56:22,947 (2d400c) :  DEBUG (runtime:918) - Response: [200] str, 16 bytes
2014-07-28 21:56:22,955 (2d400c) :  CRITICAL (runtime:1122) - Exception in thread named '_handle_request' (most recent call last):
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1120, in _start_thread
    f(*args, **kwargs)
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/interfaces/socketinterface.py", line 126, in _handle_request
    self.finish()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/tornado/web.py", line 565, in finish
    self.request.finish()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/tornado/httpserver.py", line 432, in finish
    self.connection.finish()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/tornado/httpserver.py", line 262, in finish
    self._finish_request()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/tornado/httpserver.py", line 283, in _finish_request
    self.stream.close()
  File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/tornado/iostream.py", line 123, in close
    self.io_loop.remove_handler(self.socket.fileno())
  File "/volume1/@appstore/Plex Media Server/Resources/Python/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
  File "/volume1/@appstore/Plex Media Server/Resources/Python/lib/python2.7/socket.py", line 170, in _dummy
    raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor

Again, please provide feedback on agent options missing, how the scanner scales when compared to BABS, etc... it's difficult to develop on my own...

Corrections:

   . Support correctly endings (ED1 gets mapped to ep 151 then renamed with appropriate xml "Cxx" infos)

   . Season 0 posters corrected

To do

   . if season 2 present, need to use tvdb numbering only

ty this even fixed a few little other things for me :p

Naming EDs works nearly perfect with one exception: [screen](http://puu.sh/aBiKJ/02b1602d84.jpg)

Files are named like this: _Angel_Beats!_NCEDx_