[Rel] HTTP Anidb Metadata Agent (HAMA)

apologies if i misses it
I could add a regex to recognise Cxx as anidb numbering in the ASS scanner as I already load the anidb XML in the code but will have to shift to the usual episode range so it is transparent for the agent

I need to ensure Lambda agent is bug free first as it was a comissionned application then that I resolved pending Hama bugs.

Recognising AniDB ep numbering would be great. Not just Cxx, but the rest of the letters (SCTPO). It would make your life easier too, by not relying on regexes when your source is the AniDB HTTP API.

com.plexapp.agents.hama.zip (115.3 KB)
root.scanner.zip (1.0 KB)

Ok so here is the deal. I contacted you once about Fairy Tail before. It was working, then a plex update, then it renumbered them. I have multiple duplicates and it goes to 100. It names the first 48, which shows me it was using tvdb, and the rest are just Episode #. I have tried all troubleshooting steps, which brought me here. So hopefully you can tell me what’s going on, because I am lost here.

Correction: It has named them to 100, but still has duplicates.

@cbanks79 First line of the readme: ā€œIf all video files are showing in plex at the right season and episode number, the scanner did its job.ā€.

The scanner thus re-numbered the episodes, nothing to do with Hama.
I have only root folder logs, the scanner crashed seemingly running the series call.

  • Update ASS to latest
  • re-scan
  • include Plex_root/Logs/plex series scanner.log if issues persists

It’s 175 episodes to Fairy Tail though, not 100. I did the entire read me before coming here for assistance. I will repeat and send the logs again. The logs that I sent were all that were in the folder.

The readme indicated the scanner chooses the season and episode number so this should have been raised on the scanner thread instead. If you used another agent like TheTVDB, the episode number wouldn’t change…

The logs do not show the calls to the actual anime folder, just the root.

Please make sure ASS is the active scanner, default plex scanner number episodes only to 100 eps so it seem awfully similar. then re-scan and join both series scanner logs if present and plex general scanner

thank you.

What I had to do was undo everything from hama and ASS. When that happened, I uninstalled Plex and reinstalled. Then I went to do a single folder for Fairy Tail. It did the numbering to 100 once again, so I deleted everything from hama and run a new scan. It then screened 100 episodes, then refreshing the metadata made it go to 175. I had to do the same thing to Fairy Tail 2014. It only happened with Fairy Tail, no other long running anime

@cbanks79 Thanks for letting us know. Never had it happen like that so good to know.

Numbering is scanner related so i guess the Plex database corrupted.
I had that few times (when developping it crashes a lot and it happen more often, when cleaning bundles and optimizing databases it occurs less) but for me it stopped updating some series and not others…

Hey all, I’m not sure if this is the right place to post this, so I’m sorry if it isn’t. I’m having trouble with updating Hama. When I run the updater, this is what shows up. Can anybody help me?

@kattara Did you stop Plex by right clicking>exit in the system tray beforehand ? You can update manually as well. here the agent files are in use so cannot be moved, then cannot move the downloaded verion since some files remain…

Hey @ZeroQI I have something weird going on. Utawarerumono: Itsuwari no Kamen [anidb-11272] is coming up as UFO Princess Valkyrie [anidb-160] even after matching the exact title to correct it. Is this something going on with Hama or Plex? com.plexapp.agents.hama.zip (523.1 KB)
root.scanner.zip (1.2 KB)


It has also happened in high school dxd

t:16) - === Search ============================================================================================================
2018-09-13 19:04:47,775 (3f14) : INFO (logkit:16) - Title: ā€˜Utawarerumono - Itsuwari no Kamen [anidb-11272]’, name: ā€˜None’, filename: ā€˜J%3A%5CUtawarerumono%20-%20Itsuwari%20no%20Kamen%20[anidb-11272]%5C[SanKyuu]%20Utawarerumono%20-%20Itsuwari%20no%20Kamen%20-%202x25%20[BD%20720p%20HEVC%20AAC]%20[F07D8637]%2Emkv’, manual: ā€˜True’, year: ā€˜None’
2018-09-13 19:04:47,775 (3f14) : INFO (logkit:16) - =============================================================================================================================================================
2018-09-13 19:04:47,776 (3f14) : INFO (logkit:16) - [!] multiple seasons = tvdb numbering, BAKA!
2018-09-13 19:04:47,776 (3f14) : INFO (logkit:16) - Forced ID - source: anidb, id: 11272, title: ā€˜Utawarerumono - Itsuwari no Kamen’

why force an anidbid on a season 2? anidb doesn’t have season 2…

=== Update ==================================================================================================================================================
2018-09-13 19:07:40,105 (28dc) : INFO (logkit:16) - id: anidb-11272, title: Utawarerumono: Itsuwari no Kamen, lang: en, force: True, movie: False
2018-09-13 19:07:40,105 (28dc) : INFO (logkit:16) - -------------------------------------------------------------------------------------------------------------------------------------------------------------
2018-09-13 19:07:40,105 (28dc) : INFO (logkit:16) - AnimeLists.GetMetadata() - tvdb_numbering: True
2018-09-13 19:07:40,125 (28dc) : INFO (logkit:16) - [+] AniDBid: 11272, TVDBid: 79880, defaulttvdbseason: 2, offset: 0, name: Utawarerumono: Itsuwari no Kamen
2018-09-13 19:07:40,132 (28dc) : INFO (logkit:16) - #2 - TVDB_id: , TVDBid: 81477
2018-09-13 19:07:40,132 (28dc) : INFO (logkit:16) - ----- ------
2018-09-13 19:07:40,132 (28dc) : INFO (logkit:16) - 11272 81477
2018-09-13 19:07:40,154 (28dc) : INFO (logkit:16) - mappingList: {ā€˜TVDB’: {ā€˜s2’: {ā€˜11272’: ā€˜0’}}, ā€˜defaulttvdbseason’: ā€˜2’, ā€˜name’: ā€˜Utawarerumono: Itsuwari no Kamen’, ā€˜episodeoffset’: ā€˜0’}
2018-09-13 19:07:40,155 (28dc) : INFO (logkit:16) - language_posters: [ā€˜en’]
2018-09-13 19:07:40,157 (28dc) : INFO (logkit:16) -

Mapping xml
<anime anidbid=ā€œ11272ā€ tvdbid=ā€œ79880ā€ defaulttvdbseason=ā€œ2ā€ episodeoffset=ā€œā€ tmdbid=ā€œā€ imdbid=ā€œā€> <name>Utawarerumono: Itsuwari no Kamen</name> </anime>

mapping list find tvdbid 79880 then assign 81477… Bug in the AnimeList mapping part, possibly due to an anidb id assigned to a multiple season series which should be assigned a tvdbid OR move from season 2 the eps to season 1. Will have a look at the code latter

This is happening with almost 1/3 of my server. I did move the files to one folder and it fixed them, but the other folders have everything in there.

i reproduced the series you mentioned.
when assigning an anidbid on this series while files are in season 2 the bug appear

I corrected it so while it will have the right tvdb id:

2018-09-15 11:47:50,467 (2330) :  INFO (logkit:16) - AnimeLists.GetMetadata() - tvdb_numbering: True
2018-09-15 11:47:50,526 (2330) :  INFO (logkit:16) - [+] AniDBid: 11272, TVDBid:  79880, defaulttvdbseason:  2, offset:   0, name: Utawarerumono: Itsuwari no Kamen
2018-09-15 11:47:50,542 (2330) :  INFO (logkit:16) -              -----          ------
2018-09-15 11:47:50,543 (2330) :  INFO (logkit:16) -              11272           79880
2018-09-15 11:47:50,586 (2330) :  INFO (logkit:16) - mappingList: {'defaulttvdbseason': '2', 'name': 'Utawarerumono: Itsuwari no Kamen', 'episodeoffset': '0'}
2018-09-15 11:47:50,589 (2330) :  INFO (logkit:16) - language_posters:  ['ja']

However if you assign season 2 to an anidbid, ep mapping will be wrong and eps will have no metadata i expect.
Do assign a forced id:

  • anidbid if the folder follows anidb numbering
  • tvdbid if it follows thetvdb numbering.

Please:

  • update to latest HAMA version released
  • update metadata on one impacted series
  • if issue still present forward the hama agent log

Yep, I did, but it’s still giving that error. The update used to run just fine, but now it doesn’t. Hama isn’t pulling data from anidb and myanimelist anymore. :thinking:

i did fix anime-lists management. need logs for impacted series as it behaves right for me in my tests

Here is my Hama log. I don’t know why it isn’t getting any metadata anymore.
com.plexapp.agents.hama.log (62.5 KB)