Fribb / MyAnimeList.bundle

Plex Media Server Metadata Agent for MyAnimeList.net
147 stars 15 forks source link

myanimelist.net agent shows up under "movies" in the agents section but not "shows" #39

Closed mokahless closed 1 year ago

mokahless commented 1 year ago

1.28.1.6104 plex version. myanimelist v7.3.2. Ubuntu 20.04

777'd entire folder. Restarted multiple times. Manually stopped and started service multiple times. But it seems to be there and "partly" working so it doesn't seem like it's not detecting or using the plugin.

myanimelist.net agent shows up under agents section for "movies" but not for "shows." This means also when editing an existing or creating a new library, it does not show up under the agents list when selecting "absolute series scanner" as the scanner. Tried updating ASS and that changed nothing. Can't find a working dl link to BABS to try that.

If I set up my anime library as "movies" and use the default movie scanner, the agent works just fine, except, you know everything's messed up because it formats every episode of every show as movie. Point is it seems to be working, I just can't get it to match up with ASS

Log files are huge. Not sure which log to look in or which keywords to search for for anything useful. Navigating around these sections while viewing the live logs in another windows filtered to "info+warning+error" didn't come up with anything.

image

This is actually my second time attempting this with my setup. I tried it with an older version Feb. 8 of this year. Couldn't get it working for the same reason back then (didn't notice it existed under agents last time though, just figured my plugin detection was permanently messed up).

Edit: I've also discovered I can manually "automatch" individual shows to myanimelist.net in my library that is currently set to ASS/hama

Fribb commented 1 year ago

First and foremost, the scanner has no impact on what Agents are available, there is no logic there that would determine only certain Agents to be displayed. What is essential is the Library type.

The Agent itself has two definitions, one for TV-Shows and one for Movies that are being loaded and used when Plex loads the Agent on startup. This definition is in the MyAnimeList.bundle/Contents/__init__.py folder.

Can you upload that file to Pastebin or something, maybe it is corrupted in that part? And please post the Agent log files.

I just tried it on my Plex-Test Server instance by removing the Plugin completely, restarting the server to remove it from plex and then adding it again (took 2 reboots) but the Agent still was added in both Movies and TV-Shows. The Server is on version 1.29.2.6364 which is the latest Public release (you might want to update your server).

Generally speaking, I wouldn't recommend just giving full access to everything but rather following the permission and ownership on things that Plex already has access to. Then again, if one part is being loaded, I wouldn't really be able to think of any reason why the other part is not.

mokahless commented 1 year ago

Just posting for now to say that I found the logs. Turns out "download logs" in the webui excludes the "PMS Plugin Logs" directory. I'll update plex and see about uploading the full agent logs and the init.py (inside Core directory, at a glance appears to be fine with both definitions) later when I have more time but for now, here's the startup part of the log quick copy paste of an error, then a relevant looking section:

2022-11-19 23:40:02,479 (7f46c48ab808) : CRITICAL (runtime:1299) - Exception getting hosted resource hashes (most recent call last): File "/usr/lib/plexmediaserver/Resources/Plug-ins-788f82488/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 1293, in get_resource_hashes json = self._core.networking.http_request("http://127.0.0.1:32400/:/plugins/com.plexapp.system/resourceHashes", timeout=10).content File "/usr/lib/plexmediaserver/Resources/Plug-ins-788f82488/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 242, in content return self.__str__() File "/usr/lib/plexmediaserver/Resources/Plug-ins-788f82488/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 220, in __str__ self.load() File "/usr/lib/plexmediaserver/Resources/Plug-ins-788f82488/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 158, in load f = self._opener.open(req, timeout=self._timeout) File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 473, in error return self._call_chain(*args) File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/plexmediaserver/Resources/Python/python27.zip/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found

2022-11-19 23:40:02,490 (7f46c1479b38) : DEBUG (core:539) - Server version is 1.28.1.6104-788f82488 2022-11-19 23:40:02,498 (7f46c14bfb38) : DEBUG (services:362) - Loaded services 2022-11-19 23:40:02,501 (7f46c149cb38) : DEBUG (services:438) - No shared code to load 2022-11-19 23:40:02,503 (7f46c48ab808) : DEBUG (core:566) - Finished loading plug-in code 2022-11-19 23:40:02,630 (7f46c48ab808) : DEBUG (agentkit:1132) - Creating new agent class called MyAnimeList_TV 2022-11-19 23:40:02,631 (7f46c48ab808) : DEBUG (agentkit:937) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia', 'com.plexapp.agents.opensubtitles', 'com.plexapp.agents.subzero', 'com.plexapp.agents.xbmcnfo', 'com.plexapp.agents.xbmcnfotv', 'com.plexapp.agents.hama'], 'fallback_agent': None, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'MyAnimeList.net'}] 2022-11-19 23:40:02,631 (7f46c48ab808) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQo2CmRpY3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CjIKczM5Cm5ldC5mcmliYnRhc3RpYy5jb2RpbmcucGxleC5teWFuaW1lbGlzdHMxMAppZGVudGlmaWVycjEKczEwCmFnZW50X2luZm8xCnIyCjEwCnIzCnMxMQptZWRpYV90eXBlc3I0CnMxMgphY2NlcHRzX2Zyb21uczE0CmZhbGxiYWNrX2FnZW50bnMxNApjb250cmlidXRlc190b3I1CnM5Cmxhbmd1YWdlc2IxczIwCnBlcnNpc3Rfc3RvcmVkX2ZpbGVzaTAKczcKdmVyc2lvbmIxczE2CnByaW1hcnlfcHJvdmlkZXJiMXM1CnByZWZzczE1Ck15QW5pbWVMaXN0Lm5ldHM0Cm5hbWUxCnM3ClRWX1Nob3c2CnMyOQpjb20ucGxleGFwcC5hZ2VudHMubG9jYWxtZWRpYXMzMgpjb20ucGxleGFwcC5hZ2VudHMub3BlbnN1YnRpdGxlc3MyNgpjb20ucGxleGFwcC5hZ2VudHMuc3ViemVyb3MyNgpjb20ucGxleGFwcC5hZ2VudHMueGJtY25mb3MyOApjb20ucGxleGFwcC5hZ2VudHMueGJtY25mb3R2czIzCmNvbS5wbGV4YXBwLmFnZW50cy5oYW1hMjMKczIKZW5zMgpmcnMyCnpoczIKc3ZzMgpub3MyCmRhczIKZmlzMgpubHMyCmRlczIKaXRzMgplc3MyCnBsczIKaHVzMgplbHMyCnRyczIKcnVzMgpoZXMyCmphczIKcHRzMgpjc3MyCmtvczIKc2xzMgpocnIwCg__' 2022-11-19 23:40:02,636 (7f46c48ab808) : DEBUG (agentkit:1132) - Creating new agent class called MyAnimeList_Movie 2022-11-19 23:40:02,637 (7f46c48ab808) : DEBUG (agentkit:937) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia', 'com.plexapp.agents.opensubtitles', 'com.plexapp.agents.subzero', 'com.plexapp.agents.xbmcnfo', 'com.plexapp.agents.xbmcnfotv', 'com.plexapp.agents.hama'], 'fallback_agent': None, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'MyAnimeList.net'}, {'media_types': ['Movie'], 'accepts_from': ['com.plexapp.agents.localmedia', 'com.plexapp.agents.opensubtitles', 'com.plexapp.agents.subzero', 'com.plexapp.agents.xbmcnfo', 'com.plexapp.agents.xbmcnfotv', 'com.plexapp.agents.hama'], 'fallback_agent': None, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'MyAnimeList.net'}] 2022-11-19 23:40:02,637 (7f46c48ab808) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X0FnZW50U2VydmljZTpVcGRhdGVJbmZv/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQo4CmRpY3QKbGlzdApkaWN0Cmxpc3QKbGlzdApsaXN0CmRpY3QKbGlzdAoyCnMzOQpuZXQuZnJpYmJ0YXN0aWMuY29kaW5nLnBsZXgubXlhbmltZWxpc3RzMTAKaWRlbnRpZmllcnIxCnMxMAphZ2VudF9pbmZvMgpyMgpyNgoxMApyMwpzMTEKbWVkaWFfdHlwZXNyNApzMTIKYWNjZXB0c19mcm9tbnMxNApmYWxsYmFja19hZ2VudG5zMTQKY29udHJpYnV0ZXNfdG9yNQpzOQpsYW5ndWFnZXNiMXMyMApwZXJzaXN0X3N0b3JlZF9maWxlc2kwCnM3CnZlcnNpb25iMXMxNgpwcmltYXJ5X3Byb3ZpZGVyYjFzNQpwcmVmc3MxNQpNeUFuaW1lTGlzdC5uZXRzNApuYW1lMQpzNwpUVl9TaG93NgpzMjkKY29tLnBsZXhhcHAuYWdlbnRzLmxvY2FsbWVkaWFzMzIKY29tLnBsZXhhcHAuYWdlbnRzLm9wZW5zdWJ0aXRsZXNzMjYKY29tLnBsZXhhcHAuYWdlbnRzLnN1Ynplcm9zMjYKY29tLnBsZXhhcHAuYWdlbnRzLnhibWNuZm9zMjgKY29tLnBsZXhhcHAuYWdlbnRzLnhibWNuZm90dnMyMwpjb20ucGxleGFwcC5hZ2VudHMuaGFtYTIzCnMyCmVuczIKZnJzMgp6aHMyCnN2czIKbm9zMgpkYXMyCmZpczIKbmxzMgpkZXMyCml0czIKZXNzMgpwbHMyCmh1czIKZWxzMgp0cnMyCnJ1czIKaGVzMgpqYXMyCnB0czIKY3NzMgprb3MyCnNsczIKaHIxMApyNwpzMTEKbWVkaWFfdHlwZXNyNApzMTIKYWNjZXB0c19mcm9tbnMxNApmYWxsYmFja19hZ2VudG5zMTQKY29udHJpYnV0ZXNfdG9yNQpzOQpsYW5ndWFnZXNiMXMyMApwZXJzaXN0X3N0b3JlZF9maWxlc2kwCnM3CnZlcnNpb25iMXMxNgpwcmltYXJ5X3Byb3ZpZGVyYjFzNQpwcmVmc3MxNQpNeUFuaW1lTGlzdC5uZXRzNApuYW1lMQpzNQpNb3ZpZXIwCg__' 2022-11-19 23:40:02,642 (7f46c48ab808) : INFO (__init__:8) - [MyAnimeList.net] Starting MyAnimeList.net Metadata Agent v7.3.2

will post everything properly later.

Fribb commented 1 year ago

so from the logs it says

2022-11-19 23:40:02,630 (7f46c48ab808) : DEBUG (agentkit:1132) - Creating new agent class called MyAnimeList_TV

DEBUG (agentkit:937) - Updating agent information: [{'media_types': ['TV_Show'], 'accepts_from': ['com.plexapp.agents.localmedia', 'com.plexapp.agents.opensubtitles', 'com.plexapp.agents.subzero', 'com.plexapp.agents.xbmcnfo', 'com.plexapp.agents.xbmcnfotv', 'com.plexapp.agents.hama'], 'fallback_agent': None, 'contributes_to': None, 'languages': ['en', 'fr', 'zh', 'sv', 'no', 'da', 'fi', 'nl', 'de', 'it', 'es', 'pl', 'hu', 'el', 'tr', 'ru', 'he', 'ja', 'pt', 'cs', 'ko', 'sl', 'hr'], 'persist_stored_files': True, 'version': 0, 'primary_provider': True, 'prefs': True, 'name': 'MyAnimeList.net'}]

What I just saw is that "Updating agent information" part is being logged twice both with media_types TV-Show even though it says "Creating new agent class called MyAnimeList_Movie". But that also happens with my instance so it should still work...

This is a really strange issue and I can't think of any plausible reason why plex would load one but not the other class.

mokahless commented 1 year ago

So I got busy and recently came back to pick up troubleshooting and it has appeared in the list now. No idea why. I haven't even restarted plex since. But since there's nothing to be done or that I can investigate anymore, I guess close the issue. For anyone googling with a similar issue, try waiting a few days, I guess?

Fribb commented 1 year ago

Yes, I thought it would fix it somehow on its own. I still can't understand why it would load only one part and ignore the other. But I guess this is what we have to deal with, with something that doesn't get developer support.

Still, glad that this got resolved.

george-emerald commented 1 year ago

I have the same issue. Will wait for a few days as suggested and come back here if it persists. Hope it fixes itself.

george-emerald commented 1 year ago

It fixed itself. Weird.