[Rel] HTTP Anidb Metadata Agent (HAMA)

I can confirm generate video previews was never on for that library, I even pressed the delete video thumbnails button a few times.

As for the cover art, it now seems to have worked with other series, it just struggled with monotogari, so things are fine there for now.

So I’ve been trying to get HAMA to fetch Studio and show ratings from MAL but it doesn’t seem to work. I’ve read up and there seems to be an issue of outdated API. So is @Lightless’s code working or are you still working on it?

Completely forgot about it, thanks for reminding me.
I will try to solve any bug but my focus is

I did create a new branch to test MyAnimeList code based on Lighless code

  • download here: https://github.com/ZeroQI/Hama.bundle/tree/MyAnimeList
  • I did re-code in a single file to avoid Utils.py so the file will need correcting when the API changes as a drawback
  • supported fields: title, summary, rating, content_rating, duration, originally_available_at, poster
  • It is untested, please test and report with hama logs if any issue.

I’m having trouble fetching metadata from anidb using hama. Even when matching manually. It finds the title and then swaps the name to the anidb listing but won’t fetch any other data. This is only happening when I use Hama and only started happening when I moved from a linux server to a windows machine but the move was a complete fresh install.

I’ve done the plex dance, reinstalled Plex multiple times as well as Hama and ASS. I even downloaded the anime-titles.xml from anidb and replaced that as well.

Any help or insight is appreciated and thanks ZeroQI for the great agent. !

plex.PNG|690x326

2 Likes

I am having a hard time figuring out how to get english summary for anime episodes, sometimes I’ll get japanese instead, even the xml file appears to be in english but it shows in japanese instead, any help would be greatly appreciated
PlexHama.rar (1.1 MB)

Leaving AniDB only on TSEM ‘summary’ did what I wanted so nvm about my problem

@missingguest Check the custom per-series agent log, it summarizes at the end which source gave the metadata and the order and which other source had that info…
Settings for the agents are self explanatory enough…
There is a troubleshooting section on github readme and it clearly list logs location…

Breaking my head at this atm.

When i try to refresh the metadata or match an anime with ASS and HAMA it just returns this error:

Screenshot from 2020-08-28 01-46-27

I’ve followed the instructions on how to install everything according to the readme. Oddly enough, it worked just some weeks ago, then suddenly stopped.

Anyone got a good guess on what the issue could be? Metadata for stuff that doesn’t use ASS / HAMA works fine.

com.plexapp.agents.hama.log (121.2 KB) com.plexapp.system.log (331.8 KB) Dr.Stone.agent-search.log (2.1 KB) Dr.Stone.filelist.log (7.4 KB) Dr.Stone.scanner.log (9.1 KB)

1 Like

i’m having the same issue.
The hama agent log you posted has this critical error , I see the same error in my logs as well.
I’m guessing something has changed or is broken with the aniDB api?

2020-08-28 00:13:34,695 (-4fa01ba0) : CRITICAL (agentkit:1018) - Exception in the search function of agent named ‘HamaTV’, called with keyword arguments {‘openSubtitlesHash’: ‘78df103d065e15ba’, ‘episode’: ‘1’, ‘name’: None, ‘episodic’: ‘1’, ‘show’: ‘[Kamigami] The Tale of Princess Kaguya [BD1080p x264 AC3]’, ‘season’: ‘1’, ‘plexHash’: ‘1e2d3e900399f7dd1b9890bcebaabaea4cd0079f’, ‘filename’: ‘%2Fmnt%2Ffiles%2Fanime%2F%5BKamigami%5D%20The%20Tale%20of%20Princess%20Kaguya%20%5BBD1080p%20x264%20AC3%5D%2FThe%20Tale%20of%20Princess%20Kaguya%2Emkv’, ‘year’: None, ‘duration’: ‘8233408’, ‘id’: ‘273’} (most recent call last):
File “/usr/lib/plexmediaserver/Resources/Plug-ins-a78fef9a9/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py”, line 1011, in _search
agent.search(*f_args, **f_kwargs)
File “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/init.py”, line 164, in search
def search (self, results, media, lang, manual): Search (results, media, lang, manual, False)
File “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/init.py”, line 113, in Search
if movie or max(map(int, media.seasons.keys()))<=1: maxi, n = AniDB.Search(results, media, lang, manual, movie)
File “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Hama.bundle/Contents/Code/AniDB.py”, line 55, in Search
Log.Info(‘len AniDBTitlesDB: {}’.format(len(AniDBTitlesDB)))
TypeError: object of type ‘NoneType’ has no len()

So, the latest anime-titles.xml is about 5MB. This seems to be large enough to make Hama hate it even more than before and actually just delete it. At least that’s been my experience for the past few days.

I have re-added the anime-titles.xml file manually and it gets removed as soon as Hama tries to match a series.

1 Like

Same thing is happening to me, as a result HAMA cannot find any matches for any series

2 Likes

If anyone floating by is still having this issue. You will need to update HAMA.

3 Likes

Updated. the 5MB issue is fixed.

1 Like

Hey ZeroQI,

I was wondering the following. The anime Re:Zero has received a Directors Cut.
Listed as followed:


O1-O13
and as a separate section in

How would I be able to add this to my current normal season + movies? I do not know how to force it to reference to the alternate or O numbers.

Not that issue?

your links helped me to fix it.

was having a few different issues.

First: It seems that when use the following structure:
image
With folders in there:
image
It always reverted back to THETVDB, and I could not get the metadata from AniDB, resulting in the Directors cuts to be called Other 1-13 without any data.

I moved the 3 folders now to root and it merged it perfectly after after I manually matched the first season to anidb11370.

Mostly when I run into issues the first thing I do is update ASS and HAMA, so the xml problem was already fixed I think (I have all shows listed)

What was the rule for forcing anidb metadata?
I thought it was only adding the [anidb2-xxxx] to the folder and have it in root or in a subdir.
Mine seems to each time convert it to thetvdb instead when I do it.

Thx for the help anyways!

[anidb-xxxx] forces the anidb id and indicate AniDB numbering for oth specials and episodes

[anidb2-xxxx] use a super complicated suicidal mode where it converts it virtually to TheTVDB numbering the season and episode number and force a tvdbid in the title, if all is number as expected and anidb and tvdb and ScudLee mapping files are all perfect… Please do not use that mode casually, use [anidb-xxxx] instead

@ZeroQI Hi. Any plans on merging MAL branch to the master, or is it still in testing? Or could you at least merge latest master commits to the MAL branch? I’d like to test it out, but would like to have the other latest changes too.

if you can test movies and series and confirm logs shows meta is gathered from MAL, I will commit it…

Currently my setup has MAL just for the rating/reviews fields (most other fields use AniDB,TheTVDB). I have a mixed tv/movie library of around 150 titles. Will it be ok if I just left MAL for the ratings field, and added it for studios? I can refresh metadata for my library and then look in the logs if those two are indeed fetched from MAL.

1 Like