[Release] [Alpha] [v0.1.3][v0.1.4 demo-7] Plex Anime Multi Source Agent (AMSA)

I’ve gone ahead and released the seventh demo of the newly re-coded AMSA.
The demo is meant for people who’d like to help me test the new functionality and i’d advise people don’t use this as their primary agent but instead create a new Plex library in order to demo it.

Changes since demo 6:

  • Updated proxy code (Issue github.com/Dingmatt/AMSA/issues/4)
  • Added a few episode titles to the AniDB bad title list (designed to help reduce the likelihood of using lazy AniDB titles)

All other notes from Demo 6 are still applicable.

ooh. new version. will download and test

build the new library and i must say i’m impressed.
95% of all files got detected without a problem (and i have done no file renaming)
there are still 1-2 anime with multiple season that get lumped together (but than again the naming is to similar, so its almost impossible for a program to split them automatically.)
and 1 that get lumped under the wrong name. and can’t change it (probably because its a rare piece.)
I will go trough the whole list but I think you have a very strong agent here.

First off i wanted to say thanks for this great agent, I recently changed my entire library into season based vs Absolute numbering and this agent was perfect for me. It matched everything I had perfectly, except for a single title which seems to be bugged with tvdb-anidb matching.

I am using the latest test version

The title in question is Magi Sinbad no Bouken(Magi: Adventure of Sinbad). It can find the title fine and match it, but then it selects Magi: The Labyrinth of Magic when mapping to the TVDB for info.

What it maps to: thetvdb.com/?id=262094&tab=series
What it should map to: thetvdb.com/?tab=series&id=310718

Hi @selkie707,

The agent uses data from a third party source in order to maintain its link between AniDB and TvDB and occasionally that data can be wrong, to counter that I maintain a list of corrections that AMSA will routinely update from (on average once every 24 hours); I’ve gone ahead and added the correction you’ve highlighted.

If you don’t want to wait for AMSA to fetch the update on its own then you can always download it manually from here and overwrite the file in your “Plex Media Server\Plug-in Support\Data\com.plexapp.agents.amsa_test\DataItems\Cache” folder, if you do decide to get it manually then you’ll also need to restart your plex server app in order for it to work.

Either way once that’s done you can simply refresh the shows metadata (the triple dot menu then ‘Refresh Metadata’) and it should update to the correct information.

@Dingmatt said:
Hi @selkie707,

The agent uses data from a third party source in order to maintain its link between AniDB and TvDB and occasionally that data can be wrong, to counter that I maintain a list of corrections that AMSA will routinely update from (on average once every 24 hours); I’ve gone ahead and added the correction you’ve highlighted.

If you don’t want to wait for AMSA to fetch the update on its own then you can always download it manually from here and overwrite the file in your "Plex Media Server\Plug-in Support\Data\com.plexapp.agents.amsa_test\DataItems\Cache" folder, if you do decide to get it manually then you’ll also need to restart your plex server app in order for it to work.

Either way once that’s done you can simply refresh the shows metadata (the triple dot menu then ‘Refresh Metadata’) and it should update to the correct information.

Thanks for the quick reply!

It appears that “Magi: Adventure of Sinbad” is still not mapping correctly however. I checked my anime-list corrections file and it does have the new entry for Sinbad no Bouken. I checked the bundle file it generates when matching the content and i figured out that it thinks that it is season 3 of “Magi: The Labyrinth of Magic”. I have attached the bundle file.

I have one more correction for you that I have found, not sure how easy it will be to fix though since its a bit tricky.
on TVDB the entire Bakemonogatari series and its sequals are just named Monogatari

The folder itself is named Monogatari so it matches to “Monogatari Series Second Season” (anidb-9183) since anidb does not have an entry for just “Monogatari”. When it matches to that however it does not correctly correctly pull metadata from TVDB.

It downloads metadata for s3(Monogatari Series Second Season) from tvdb and applies it to s1. The other seasons and specials do not download any metadata.

@selkie707 Ah my fault I forgot a step, delete the existing Magi bundle file and refresh the metadata (its a separate caching issue that’ll be fixed in the next version).

As for the Monogatari franchise, you should be able to sort that by clicking “Fix Match…” and selecting “Bakemonogatari” from the list; its a slight nuisance but automatching will never be 100% (though I’m constantly refining it).

How do I get metadata (title and summary) in my language?

@“Davide F.” said:
How do I get metadata (title and summary) in my language?

The agent currently supports multilingual series and episode naming which can be selected from the setting menu.

As for other meta information such as description, genre, etc its limited to the sources currently used, TVDB and AniDB are predominantly English sites so don’t store much of the metadata in other languages; I’d need to find a multilingual metadata source (or multiple) in order to offer that functionality. I’m happy to do that but only once the agents beyond its beta and the existing agents are feature complete.

The agent itself is currently limited to English (settings menu, documentation, etc) though again I’d be happy to expand that once I have the time, though the fist iterations may need to be google translated with community driven corrections going forward.

I am having difficulty matching anything right now. When I do a manual search it just keeps trying (spinning circle) but never gets any results. Tried on both chrome and firefox…I believe it worked fine in the past. Tried deleting the AMSA files and re-installing the newest version.

@zxv said:
I am having difficulty matching anything right now. When I do a manual search it just keeps trying (spinning circle) but never gets any results. Tried on both chrome and firefox…I believe it worked fine in the past. Tried deleting the AMSA files and re-installing the newest version.

Same issue I am getting, the logs show this

“ConnectionError: HTTPConnectionPool(host=‘proxyfor.eu’, port=80): Max retries exceeded with url: /geo.php (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x0405D230>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed’,))”

@zxv @kossiewossie
Are you still having these issues? From that error message it looks like the the plugin has swapped over to its internal proxy as its unable to access one or more of the sources direct.

Usually these kinds of outages only last for a few hours, a day at most; if you still having an issue can you please send me over your error logs and I’ll look to fix things.

@Dingmatt
I am having this issue as well, please help

2018-04-20 00:35:59,211 (2c40) :  INFO (core:349) - Starting framework core - Version: 2.6.3, Build: 215c28d (Thu Apr 12 13:21:13 UTC 2018)
2018-04-20 00:35:59,213 (2c40) :  DEBUG (core:361) - Using the elevated policy
2018-04-20 00:35:59,213 (2c40) :  DEBUG (core:450) - Starting runtime component.
2018-04-20 00:35:59,214 (2c40) :  DEBUG (core:450) - Starting caching component.
2018-04-20 00:35:59,214 (2c40) :  DEBUG (core:450) - Starting data component.
2018-04-20 00:35:59,214 (2c40) :  DEBUG (core:450) - Starting networking component.
2018-04-20 00:35:59,216 (2c40) :  DEBUG (networking:284) - Loaded HTTP cookies
2018-04-20 00:35:59,217 (2c40) :  DEBUG (networking:452) - Setting the default network timeout to 20.0
2018-04-20 00:35:59,217 (2c40) :  DEBUG (core:450) - Starting localization component.
2018-04-20 00:35:59,217 (2c40) :  INFO (localization:409) - Setting the default locale to en-us
2018-04-20 00:35:59,217 (2c40) :  DEBUG (core:450) - Starting messaging component.
2018-04-20 00:35:59,219 (2c40) :  DEBUG (core:450) - Starting debugging component.
2018-04-20 00:35:59,219 (2c40) :  DEBUG (core:450) - Starting services component.
2018-04-20 00:35:59,219 (550) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/system/messaging/clear_events/com.plexapp.agents.amsa_test'
2018-04-20 00:35:59,219 (2c40) :  DEBUG (core:450) - Starting myplex component.
2018-04-20 00:35:59,220 (2c40) :  DEBUG (core:450) - Starting notifications component.
2018-04-20 00:35:59,341 (2c40) :  DEBUG (accessor:68) - Creating a new model access point for provider com.plexapp.agents.amsa_test in namespace 'metadata'
2018-04-20 00:35:59,345 (2c40) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes'
2018-04-20 00:35:59,365 (2c40) :  DEBUG (runtime:1117) - Created a thread named 'load_all_services'
2018-04-20 00:35:59,365 (cd4) :  DEBUG (services:265) - Plug-in is not daemonized - loading services from system
2018-04-20 00:35:59,368 (cd4) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0J1bmRsZVNlcnZpY2U6QWxsU2VydmljZXM_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMApyMAo_'
2018-04-20 00:35:59,369 (2c40) :  DEBUG (runtime:1117) - Created a thread named 'get_server_info'
2018-04-20 00:35:59,369 (2c40) :  DEBUG (core:150) - Finished starting framework core
2018-04-20 00:35:59,369 (2c40) :  DEBUG (core:560) - Loading plug-in code
2018-04-20 00:35:59,372 (51c) :  DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400'
2018-04-20 00:35:59,380 (51c) :  DEBUG (core:538) - Machine identifier is f7f63f4029aa0663d43b2d57cbcf12625ee5df06
2018-04-20 00:35:59,381 (51c) :  DEBUG (core:539) - Server version is 1.12.3.4973-215c28d86
2018-04-20 00:35:59,490 (2c40) :  DEBUG (core:566) - Finished loading plug-in code
2018-04-20 00:35:59,654 (cd4) :  DEBUG (services:362) - Loaded services
2018-04-20 00:35:59,667 (10a4) :  DEBUG (services:438) - No shared code to load
2018-04-20 00:35:59,894 (2c40) :  WARNING (data:179) - Error decoding with simplejson, using demjson instead (this will cause a performance hit) - Expecting property name enclosed in double quotes: line 55 column 3 (char 1250)
2018-04-20 00:35:59,907 (2c40) :  DEBUG (preferences:258) - Loaded preferences from DefaultPrefs.json
2018-04-20 00:35:59,908 (2c40) :  DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.agents.amsa_test
2018-04-20 00:36:01,569 (2c40) :  CRITICAL (core:574) - Exception starting plug-in (most recent call last):
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\core.py", line 608, in start
    self.sandbox.execute(self.init_code)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 256, in execute
    exec(code) in self.environment
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Code\__init__.py", line 2, in <module>
    import common, tvdb, anidb, scudlee, logging, functions, constants
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 333, in __import__
    return mod.load_module(_name)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 44, in load_module
    module = RestrictedModule(name, path, sandbox)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\loader.py", line 30, in __init__
    exec(code) in self.__dict__
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Code\common.py", line 1, in <module>
    import re, time, unicodedata, hashlib, types, os, inspect, datetime, xml, string, tvdb, anidb, scudlee, plex, functions, constants, copy, logging
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 333, in __import__
    return mod.load_module(_name)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 44, in load_module
    module = RestrictedModule(name, path, sandbox)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\loader.py", line 30, in __init__
    exec(code) in self.__dict__
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Code	vdb.py", line 1, in <module>
    import constants, functions, lxml, logging
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 333, in __import__
    return mod.load_module(_name)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\sandbox.py", line 44, in load_module
    module = RestrictedModule(name, path, sandbox)
  File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-215c28d86\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\code\loader.py", line 30, in __init__
    exec(code) in self.__dict__
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Code\functions.py", line 10, in <module>
    req_proxy = RequestProxy(sustain=True)
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\http_request_randomizer\requests\proxy\requestProxy.py", line 55, in __init__
    self.proxy_list += parsers*.parse_proxyList()
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\http_request_randomizer\requests\parsers\ProxyForEuParser.py", line 18, in parse_proxyList
    response = requests.get(self.get_URl(), timeout=self.timeout)
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\requests\api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\requests\sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\requests\sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Hei\AppData\Local\Plex Media Server\Plug-ins\Amsa_Test.bundle\Contents\Libraries\Shared\requests\adapters.py", line 504, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='proxyfor.eu', port=80): Max retries exceeded with url: /geo.php (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x05AF47B0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))````

@zxv @kossiewossie @Ares2580

I’ll look into this for you, will update you when I’ve got it sorted.

1 Like