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.