[Rel] HTTP Anidb Metadata Agent (HAMA)

@ZeroQI said:
@rightcode the scanner adds the file choosing the season and ep number so it shows in plex.
the agent put metadata on what is then showing in Plex

Anidb have low quality mismatched sized posters. i put it the lowest priority by default

In anidb there is 10 specials for elven lied: Elfen Lied - Anime - AniDB
If the OAV you have is listed as ‘S2’ label it ‘S2’ or ‘s00e02’
You are lucky for that series as OAV are separate entries altogether normally so would need another serie folder

Folders called OVAs in plex won’t happen in tv library. extras/specials and seasons

Our conversation has brought me to really understand your scanner and agent much better. Thank you. The OVA I have for Elfen Lied is S1 on AniDB. Why am I lucky that they are separate entries? Does it make it easier? Also, are you saying that by default that your HAMA agent avoids pulling posters from AniDB due to quality issues at AniDB and that your agent subsequently pulls posters from other agents? It seems not to be doing this for me and I have to manually change the agent all together. Which I don’t like because the summaries / genre categories tend to be different for other agents compared to AniDB.

@rightcode You are lucky because if it was a different entry on anidb, it would need to be in its own folder (but could be mapped to the right tvdb episode using the force ids [anidb2-xxxxx] for example so in plex they show up as one serie)

I put priority lower on AniDB posters since it doesn’t have fixed high resolution like thetvdb does but it pulls it down as long as anidb posters is selected in the agent (settings will change a lot in the next version)

I do not pull form other AGENTS, but i support posters from AniDB, tvdb, fannart.tv, myanimelist, tmdb, ombd…
I did a lot of coding for that, but the last two are mostly for movies

Yeah anidb has way better genres and only tvdb has episode summaries

The new version (still a work in progress but stable):
https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.2017-04-10.22h32.zip

  • It allows to set per field which metadata source order to use and also add custom genre tags (continuing/ended, the file extension like ‘mp4’, if dubbed/subbed with the language, like ‘Jpn subbed Eng’)…
  • Poster issues should be solved and AniDB poster is used as backup season poster…
  • use full length theme song from televisiontunes.com (some are in english though)

Thank you! @ZeroQI. I will try out this new version later today. One question: what if you have an anime movie that doesn’t have a series (for example: Akira). What is the best way to handle this with your scanner and agent? I got it to populate but calls it a season instead of a movie. This is probably because it’s in a season folder. Probably not a work around for this. But curious your thoughts.

@rightcode you can remove season folder for display…

I manage to support series and movies in series library so it isn’t bad as normal Plex scanner doesn’t even support that…

If the movie is seen as a tvdb special, you can add a anidb2 force id in the main series and movie(s) folder name and it will be displayed as a single series following tvdb numbering choosing the episode number for specials folder or the right season folder magically…

It can also map series as other seasons so only one grouped item shows. It can keep absolute ep number and insert season for long series in tvdb3 mode…

How do you force anidb IDs? In this case below about being lucky, would that mean I would need two Elfen Lied folders? One for specials and one for seasons (but the directories are separate: Elfen Lied\Season 01\Elfen Lied s01e0x, and Elfen Lied2?\Specials\Elfen Lied 01 as example. I don’t think I am grasping this correctly, but maybe you can point out my flaw. It’s possible you meant it would just need it’s own folder under the Elfen Lied folder (where seasons and specials could both be at). I got the agent to work. All of this is just me curious to understand how the agent / scanner actually works.

Also, related to Akira, this is what I mean:

It says episode one. And in the general Plex interface it says S1 E1. Akira is a movie. No episodes, just a movie. But I don’t think there is a way to have it labeled a movie since we are using a workaround to consolidate all anime into one folder (TV Shows type). Maybe you can clarify. I don’t mind leaving it like this but I am just curious.

@ZeroQI said:
@rightcode You are lucky because if it was a different entry on anidb, it would need to be in its own folder (but could be mapped to the right tvdb episode using the force ids [anidb2-xxxxx] for example so in plex they show up as one serie)

This has worked perfectly with your new beta. I don’t have to manually edit Elfen Lied now to direct it to tvdb.

I put priority lower on AniDB posters since it doesn’t have fixed high resolution like thetvdb does but it pulls it down as long as anidb posters is selected in the agent (settings will change a lot in the next version)

I guess I don’t understand HAMA correctly. I thought it pulls from the below agents for metadata.

I do not pull form other AGENTS, but i support posters from AniDB, tvdb, fannart.tv, myanimelist, tmdb, ombd…
I did a lot of coding for that, but the last two are mostly for movies

Yeah anidb has way better genres and only tvdb has episode summaries

Thank you! I just installed the new beta and I think it is much better being able to decide individual meta data which to pull!

The new version (still a work in progress but stable):
https://github.com/ZeroQI/Hama.bundle/releases/download/Beta/Hama.bundle.2017-04-10.22h32.zip

What do you mean by these theme songs? Are these played when starting the episode?

@rightcode You are correct it’s a TV Shows (Series) library, no other tool (even on emby/xbmc) to my knowledge even allow to have movies and series together and knowing plex doesn’t support that normally, i thought i did pretty well… Japanese anime has a more blurry line between movies and Series as ‘Detective Conan’ has 16 movies if i recall, which will not be showing as specials but their on entries in thetvdb.com but showing as specials on tvdb so if you keep absolute numbering you can show the serie with seasons in plex with a force id “Detective Conan [tvdb3-72454]” which will build seasons in plex that are not in the filename and leave the absolute number in each season so it’s easier to follow the 700+ episodes
http://thetvdb.com/?tab=season&seriesid=72454&seasonid=19921&lid=7
Other folders containing movies can use “[anidb2-xxxxx]” with the right anidb id for the movie and it will be mapped as the right special number magically, as long as it is mapped correctly in ScudLee’s GitHub AnimeLists xmls…

i meant if it was a separate entry on thetvdb which it is not::

  • Elfen Lied [anidb2-xxxx]\season (optional)\ep ##.ext
  • Elfen Lied movie [anidb2-xxxx]\Elfen Lied movie.ext
    That would show a unique serie as per tvdb with seasons and all even if the series follow anidb with a serie folder per season…
    The scanner allow to show files in plex, but can alter and add seasons as per thetvdb or remove multiple seasons so it shows as one (appart from specials) and let keep the absolute episode number or reset at one each season…
    If you don’t want to rename 700+ eps and would like to have season in plex so it is easier to scroll on a tablet you can control everything. you need an id file in serie folder or to add something at the end of the serie folder…
    You can even define your own seasons for long series so it match story arcs and still have it work (tvdb4 mode) or just put “[01] arc xxx” folder inside you series folder and it will skip transparently…
    I have re-written the read-me force id section, please check it…

In most instances you don’t need force id though…

My agent pulls from all these websites (metadata sources) but it’s a single Plex agent…
I had to code everything, not just merelly let another agent do the job…

if on the server settings you enable theme songs, it plays when you go into the series

You can especially see that in the new agent, you have the main init.py, common.py and everything else is a metadata source: AniDB, tvdb, fannart.tv, myanimelist, tmdb, ombd, …

Am glad you like the new version, it took a lot of time shifting code around then fixing newly brought bugs… But fixed previously un-noticed bugs in the process and getting more metadata…

This all seems interesting. So If I use this force labeling, the agent will pick up on it. While this is great for one-off situations, it’s not practical to rename an entire library, as you have pointed out. I will have to look for your new readme. I took a brief skim and couldn’t find the force section. Is it on the agent or scanner readme?

@ZeroQI said:
@rightcode You are correct it’s a TV Shows (Series) library, no other tool (even on emby/xbmc) to my knowledge even allow to have movies and series together and knowing plex doesn’t support that normally, i thought i did pretty well… Japanese anime has a more blurry line between movies and Series as ‘Detective Conan’ has 16 movies if i recall, which will not be showing as specials but their on entries in thetvdb.com but showing as specials on tvdb so if you keep absolute numbering you can show the serie with seasons in plex with a force id “Detective Conan [tvdb3-72454]” which will build seasons in plex that are not in the filename and leave the absolute number in each season so it’s easier to follow the 700+ episodes
名探偵コナン - TheTVDB.com
Other folders containing movies can use “[anidb2-xxxxx]” with the right anidb id for the movie and it will be mapped as the right special number magically, as long as it is mapped correctly in ScudLee’s GitHub AnimeLists xmls…

Understood.

i meant if it was a separate entry on thetvdb which it is not::

  • Elfen Lied [anidb2-xxxx]\season (optional)\ep ##.ext
  • Elfen Lied movie [anidb2-xxxx]\Elfen Lied movie.ext
    That would show a unique serie as per tvdb with seasons and all even if the series follow anidb with a serie folder per season…

I need to learn how to do this: define your own season, or add an id file in the series folder, which will trigger your scanner (or agent). I’ll look for the new force section on your readme…

The scanner allow to show files in plex, but can alter and add seasons as per thetvdb or remove multiple seasons so it shows as one (appart from specials) and let keep the absolute episode number or reset at one each season…
If you don’t want to rename 700+ eps and would like to have season in plex so it is easier to scroll on a tablet you can control everything. you need an id file in serie folder or to add something at the end of the serie folder…
You can even define your own seasons for long series so it match story arcs and still have it work (tvdb4 mode) or just put “[01] arc xxx” folder inside you series folder and it will skip transparently…
I have re-written the read-me force id section, please check it…

In most instances you don’t need force id though…

This makes more sense. Thank you.

My agent pulls from all these websites (metadata sources) but it’s a single Plex agent…
I had to code everything, not just merelly let another agent do the job…

This is very cool. I’ll try it out.

if on the server settings you enable theme songs, it plays when you go into the series

You can especially see that in the new agent, you have the main init.py, common.py and everything else is a metadata source: AniDB, tvdb, fannart.tv, myanimelist, tmdb, ombd, …

It’s a wonderful upgrade. Great work! This one seems easier to deploy and get done what you want compared to the last version.

Am glad you like the new version, it took a lot of time shifting code around then fixing newly brought bugs… But fixed previously un-noticed bugs in the process and getting more metadata…

One question: In the new version you have specific control over the agent used for a given criterion. Which one is appropriate to adjust for cast? For example, Escaflowne cast from tvdb is much more detailed than anibd. I’d like the detailed cast. Also, it would be cool to include other ratings like rotten tomatoes.

Thanks for everything.

@rightcode it’s in the scanner, “Forcing the movie/series ID”…
Beware of scanner cache, it no video file changed, it will not run again for given folder, so if you add an id file or in the series folder name, you might have to remove a file, refresh, put it back…

For tvdb4 own season, you just create season folders that you use as arks and move the ep to it, or crate a mapping file tvdb4.mapping.xml that you put in serie folder or library root folder…

@ZeroQI Interesting. Where would the cache folder be located? The PMS cache folder or under scanner?

unlike hama local cache it’s not an actual folder. it scan once each folder and only re-scans if video files were added/ removed.

@ZeroQI
Ah okay. I am curious why Elfen Lied special one keeps renaming to Japanese title (Tooriame nite: Arui wa, Shoujo wa Ikani Shite Sono Shinjou ni Itatta ka?). Anyway to fix this?

I am using the naming convention: …\Elfen Lied\Elven Lied s00e01 In the Passing Rain Regenschauer.mkv. I prefer the title of the episode to be in English in Plex.

@rightcode What language priority is set in the agent settings for episode title? Will need hama logs for your serie…

@ZeroQI said:
@rightcode What language priority is set in the agent settings for episode title? Will need hama logs for your serie…

This must have changed when I installed your beta. How do I retrieve my logs?

@rightcode Please check the agent readme. also:
https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files

Under Serie Language Priority I moved “en” to the front. Main comes after en. Now the titles come in English.

Edit: actually, I take it back. Elfen Lied still coming up in Japanese. My other animes have changed to English though.

Edit: Changed episode language priority to “en.” Fixed now.

cannot get the agent show on macOS Sierra at all

@dkenpachi said:
cannot get the agent show on macOS Sierra at all

Where do you have the agent stored in the file system?

@rightcode said:

@dkenpachi said:
cannot get the agent show on macOS Sierra at all

Where do you have the agent stored in the file system?

application support > Plex Media Server > Plug-ins

renamed to .bundle.

i got the scanner in but the agent wont show up , i have my animelist agent in idk if that matters

@dkenpachi said:

@rightcode said:

@dkenpachi said:
cannot get the agent show on macOS Sierra at all

Where do you have the agent stored in the file system?

application support > Plex Media Server > Plug-ins

renamed to .bundle.

i got the scanner in but the agent wont show up , i have my animelist agent in idk if that matters

Hmm… Maybe try restarting your Plex Media Server? If you haven’t. I presume there is no period after bundle?

Well that prove you know how to install a 3rd party agent at least. make sure there is no added folder in path: application support > Plex Media Server > Plug-ins > Hama.bundle > Contents > Code > init.py

compare rights in myanimelist folder and hama one