ZeroQI / Hama.bundle

Plex HTTP Anidb Metadata Agent (HAMA)
GNU General Public License v3.0
1.19k stars 110 forks source link

AniDB title synonyms and fallbacks #430

Closed toddeTV closed 3 years ago

toddeTV commented 3 years ago

When there is a AniDB title entry like the following:

<anime aid="x">
    <title type="main" xml:lang="x-jat">title 1</title>
    <title type="syn" xml:lang="en">title 2</title>
    <title type="official" xml:lang="ja">title 3</title>
</anime>

And the Serie Language Priority is set to en, main.
The resulting title in this example would be title 2.

But my goal would be to use English official titles if there is one and if not, falling back to the main title. Unfortunately there is no way known to me to set en+official as language other then only en and HAMA.bundle will take any English title, including synonyms that sometimes are really unknown.

Question:

  1. Can I achieve a language priority like en+official > main so that en+syn will be ignored?
    1. Either with HAMA without modifying the code or
    2. With a XML file containing metadata like the title in the main root of the folder with the media so that I can write a little py script that will fetch the correct title and put it there (Local Media Assets does not support this, but maybe another Agent that I can give a higher priority then HAMA.bundle?)

(and sry, can not set the label question by myself.)

ZeroQI commented 3 years ago

You can select the metadata source order, TheTVDB and AniDB but the language takes precedence, 'main, en' seem the closest to your wishes. You can replace main with romaji 'x-jat' for Japanese titles...

toddeTV commented 3 years ago

Some media is only available at AniDB and not at TVDB.
So maybe it would be an option to extend the possible user input for Serie Language Priority from lang to lang[:type] (as comma separated list where each part can have an optional :type behind it).

e.g. en would be en+official > en+syn > ... (like it currently is hard coded).
And en:official would only be a match for en+official.
So my request could be answered with the string en:official, main.

If this should be a horrible idea for enhancement/improving, feel free to close this issue.
Thank you for your answer and your time anyway :)

ZeroQI commented 3 years ago

ASS+HAMA is the only ecosystem in my knowledge to allow the source and language selected, so i am unsure it needs new coding at this time as main title generally is the right title, unless a user wants a specific language....

Do you have examples where the official title is objectively better than main title?

toddeTV commented 3 years ago

From what I understood in the code, ASS+HAMA is using the ScudLee/anime-list in order to match AniDB to TVDB. And in the anime-list-master.xml file are many entries without a conversion.

e.g.
So lets say the folders are named by the anidb2 syntax and there is a folder with [anidb2-10780]. Because there is no mapping to TheTVDB, only AniDB naming will be used and it would be:

<anime aid="1078">
    <title type="syn" xml:lang="en">Albert and Sydney</title>
    <title xml:lang="vi" type="syn">Đô-rê-mon</title>
    <title xml:lang="fr" type="official">Doraemon</title>
    <title xml:lang="pt" type="official">Doraemon</title>
    <title type="official" xml:lang="it">Doraemon</title>
    <title type="main" xml:lang="x-jat">Doraemon (1979)</title>
    <title type="official" xml:lang="es">Doraemon: El gato cósmico</title>
    <title xml:lang="gl" type="official">Doraemon: o gato cósmico</title>
    <title xml:lang="vi" type="syn">Đôrêmon</title>
    <title xml:lang="he" type="official">דורימון</title>
    <title xml:lang="ar" type="official">عبقور</title>
    <title type="official" xml:lang="ja">ドラえもん (1979)</title>
</anime>

And here the English synonym is something completely different to the main title.
Also this is a problem, when renaming only with AniDB is done. I currently only let ASS+HAMA rename with AniDB completely without TheTVDB, so this also occurs on many shows that would have a conversion.

This also is a problem for every 18+ content because these are not part of TheTVDB.

ZeroQI commented 3 years ago

if there is no tvdb mapping in scudlee mappings, using anidb2 is pointless as it rename as per thetvdb numbering actively. This mode is super complex and reliant on everything being perfect, i regret it being in the code, as people use it casually and get surprised when something goes wrong and even had users using it without knowing what it does...

The main title is great: "Doraemon (1979)" and there is no official English title, so this example doesn't make the point for new coding, at the contrary... 'main, en' works better in that sense but you will always get the romaji title then...

For adult titles, generally TMDB gave the metadata, i did include somebody's code on a branch but nobody tested so cannot include and no time to test myself

toddeTV commented 3 years ago

Ok, thanks for your time. I read the wiki and readme again and think I now understood anidb2/3/4. And of course they are pointless if scudlee mapping is missing then.

Questions:

  1. TMDB is marked as deprecated in the README. Do you recommend it anyway for adult titles? Or ...
  2. ... is the TMDB you are talking about not the one in the master? If so, branch MyAnimeList in HAMA or branch ZeroQI-Filebot in ASS?
  3. Is there a mode in HAMA/SASS to take the folder name as media title in PleX? Or maybe in combination with Local Media Assets?
  4. When I now loop with a little script over all my effected anidb2 media and let the folders rename to anidb only, I guess Hama+ASS will scan them as new media so that I lose all manual made changes from editing the media in PleX. Is there an elegant way for changing the physical mapping for media on existing PleX media?
ZeroQI commented 3 years ago

1) MyAnimeList branch 2) No 3) Actually nothing will change as Plex cache scanner result and while the folder name will have changed, but the folder content hasn't so you need to change folder content and rescan... Edits should be tied to season and ep number (to be confirmed) so when the ep number/season changes I believe the manual edits are lost

On Sat, Nov 7, 2020, 10:12 AM Thorsten notifications@github.com wrote:

Ok, thanks for your time. I read the wiki and readme again and think I now understood anidb2/3/4. And of course they are pointless if scudlee mapping is missing then.

Questions:

  1. What branch do you mean? MyAnimeList in HAMA or ZeroQI-Filebot in ASS?
  2. Is there a mode in HAMA/SASS to take the folder name as media title in PleX? Or maybe in combination with Local Media Agend?
  3. When I now loop with a little script over all my effected anidb2 media and let the folders rename to anidb only, I guess Hama+ASS will scan them as new media so that I lose all manual made changes from editing the media in PleX. Is there an elegant way for changing the physical mapping for media on existing PleX media?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ZeroQI/Hama.bundle/issues/430#issuecomment-723421585, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHMWZOI2GP4TG2VTYEQZA3SOUFPJANCNFSM4TMNDA5Q .

toddeTV commented 3 years ago

ok, thanks a lot, I will try understanding at least some of your awesome code. Really great work, thanks for your time for so many people!