Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "Romanization of Japanese" title as 'original' for Anime search #387

Closed
antonsoroko opened this issue Mar 3, 2024 · 20 comments · Fixed by #389
Closed

Use "Romanization of Japanese" title as 'original' for Anime search #387

antonsoroko opened this issue Mar 3, 2024 · 20 comments · Fixed by #389

Comments

@antonsoroko
Copy link
Contributor

continuation of elgatito/plugin.video.elementum#987

Anime tracker usually use https://en.wikipedia.org/wiki/Romanization_of_Japanese (when you use Latin alphabet to write Japanese words).

so i think we can add an option that will set "original" to "jp" (not :ja (it is real Japanese) but :jp).
we already have an option to set "original" to "en":
https://github.com/elgatito/plugin.video.elementum/blob/214aab5f32bf2f8c553a37419e9f22a2760d11c0/resources/settings.xml#L288
https://github.com/elgatito/plugin.video.elementum/blob/214aab5f32bf2f8c553a37419e9f22a2760d11c0/resources/language/messages.pot#L1573
https://github.com/elgatito/elementum/blob/efdcb9af863f3fca5cf63afe3c80da8249cc0ccb/providers/xbmc.go#L407

Expected Behavior

Current Behavior

#382

Possible Solution

replace original with jp somewhere, like here

self.info = info

@icarok99
Copy link

icarok99 commented Mar 4, 2024

Anime title obtained by TMDB for search

2024-03-04 07:00:28.041 T:16756 warning : [plugin.video.elementum] INFO api ▶ showEpisodeLinks [0mSearching links for TMDB Id: 204832
2024-03-04 07:00:28.041 T:16756 warning : [plugin.video.elementum] INFO api ▶ showEpisodeLinks [0mResolved 204832 to MASHLE: MAGIC AND MUSCLES

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Mar 4, 2024

@icarok99 you can test new version of burst with changes that you can see in #389 - https://github.com/antonsoroko/script.elementum.burst/archive/refs/heads/options-for-anime-titles.zip

you can configure this new option in burst, by default it is set to "Romanization of Japanese".

@icarok99
Copy link

icarok99 commented Mar 4, 2024

Anime title obtained by TMDB for search

2024-03-04 07:00:28.041 T:16756 warning : [plugin.video.elementum] INFO api ▶ showEpisodeLinks [0mSearching links for TMDB Id: 204832 2024-03-04 07:00:28.041 T:16756 warning : [plugin.video.elementum] INFO api ▶ showEpisodeLinks [0mResolved 204832 to MASHLE: MAGIC AND MUSCLES

@antonsoroko It didn't work because elementum gets information from TMDB.

IMG_20240304_091227

Using translated 'en' title 'mashle magic and muscles'

Using translated 'jp' title 'マッシュル mashle 神覚者候補選抜試験編'

Using translated 'original' title 'マッシュル mashle'

@icarok99
Copy link

icarok99 commented Mar 4, 2024

The TMDB database is not very good for anime because it does not use Myanimelist titles and also many animes that have several seasons the episodes are not divided by season.

Here an example about season
Screenshot_2024-03-04-09-25-54-384_org xbmc kodi

From hidden inventory is season 2
Screenshot_2024-03-04-09-26-06-290_org xbmc kodi

Screenshot_2024-03-04-09-32-00-693_org xbmc kodi

@icarok99
Copy link

icarok99 commented Mar 4, 2024

Myanimelist offers 3 title options.
Original: mashle
English title: mashle magic and muscles
Japanese title: マッシュル-MASHLE-

IMG_20240304_100050

@antonsoroko
Copy link
Contributor Author

@icarok99 for this specific anime - i see what you mean. thanks for example.
but for me - TMDB works fine for anime i watch - it has correct "Romanization of Japanese" title.
example: https://www.themoviedb.org/tv/207784

looks like there is API for myanimelist: https://myanimelist.net/apiconfig/references/api/v2
so if you want to try - please make code changes in elementum golang code and send a PR.
or create Issue in plugin.video.elementum repo, maybe someone will be interested in implementing this.

my change is about burst, not elementum, and it is small.

implementing new API will be a big piece of work - i am not ready to do this.

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Mar 4, 2024

@icarok99 alternatively - just login into TMDB and edit "jp" title of your anime. You will do many people a favor by simply doing this small change.
i think this is the easiest solution.

@antonsoroko
Copy link
Contributor Author

@icarok99 not sure if you know this, but information in tmdb is provided by users, so if something is missing or incorrect - you can fix it. So if some anime does not have Romaji title ( "jp" language code) - you can add it.

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Mar 5, 2024

@icarok99
so i tried this myself:

https://www.themoviedb.org/tv/204832-mashle/edit?active_nav_item=alternative_titles
image

and now burst receives correct info:
Using translated 'original' title 'mashle'

super easy.

P. S. Country = Japan in my screenshot.

@icarok99
Copy link

icarok99 commented Mar 5, 2024

@icarok99 so i tried this myself:

https://www.themoviedb.org/tv/204832-mashle/edit?active_nav_item=alternative_titles image

and now burst receives correct info: Using translated 'original' title 'mashle'

super easy.

It worked for me, thanks

@antonsoroko
Copy link
Contributor Author

@icarok99 just to clarify, you need to add Romaji title to Japan as country. In my screenshot it is not clear.
Adding Romaji to other country will break things, for example it can break translation of title.

@Saderius
Copy link

@antonsoroko
Question, so how does this still not work for me? Am I doing something wrong? Checked db, title in Romaji is provided, made changes in Burst for romanization and yet it still shows "English" title in every single search I make.

Just to make sure I've checked 2 titles. Sousou no Frieren (Frieren: Beyond Journey's End) and Yofukashi no Uta (Call of the Night).

Should I change some additional setting or sth?

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Apr 20, 2024

@Saderius
It also depends on what provider (torrent tracker) you use.
If you use English-only provider then obviously it will always use English, example:

"anime_keywords": "{title:en} s{season:2}e{episode:2}",

Note this :en tag that enforce English (also "language:"/"languages:" property can enforce specific language as well).

If provider has : original then original name also will be used:

"anime_keywords": "{title:original:jp} s{season:2}e{episode:2}",

(Do not mind :jp in this example, it was added to nyaa since nyaa is anime only so for nyaa it always makes sense to try to use Romaji.)

So if you use some provider that is configured as English-only, but it also has a lot of non-English torrents names - then please create PR that replaces :en with :original in keywords.

@Saderius
Copy link

@antonsoroko

(Do not mind :jp in this example, it was added to nyaa since nyaa is anime only so for nyaa it always makes sense to try to use Romaji.)

So if you use some provider that is configured as English-only, but it also has a lot of non-English torrents names - then please create PR that replaces :en with :original in keywords.

kodi-burst-low.mp4

So by this logic, if I use only Nyaa it should find anime I want using Romanji from their torrent library, right? And yet, it doesn't.

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Apr 22, 2024

@Saderius video is good, but debug log file much much better :-) for future: you can use this guide https://elementum.surge.sh/contribute/log/ to make log.

  1. Romaji is used only if it exists (was added by someone). Nyaa will always try to use it. Other providers - only if you enabled option and anime_keywords has :original.
  2. TMDB is user driven database, so if someone will add incorrect info - burst will use this this incorrect info.
  3. see https://www.themoviedb.org/tv/209867/titles#JP
    image
  4. so if you take a look into log file you will see that last "row" for Romaji is used (which is logical). Code logic is here https://github.com/elgatito/elementum/blob/0c5c77eb80f10554e4be2461df57034edc9246aa/providers/xbmc.go#L376
  5. but this last row has "incorrect" (at least for pirating world) title. So the only solution is to edit info here https://www.themoviedb.org/tv/209867/edit?active_nav_item=alternative_titles and move correct title to the end.

I made a change so after database will be updated search should work. UPD: it was updated and it works now.

You can do the same edit for any other anime that has same issue.

btw, as i can see 2nd anime you mentioned has correct Romajii info:
https://www.themoviedb.org/tv/138357/titles#JP
so search works fine for me.

@Saderius
Copy link

Saderius commented Apr 22, 2024

@antonsoroko
Then let's try to move into another example and try to digest the issue once more.
New example with log https://paste.kodi.tv/urobifipet

All I'm trying to say - user driven things are messy, always are. Woudn't it be much easier to just make an option "rename quary" or "custom title search" wchich is saved and applies to the whole show? From what I understand there is regex involved so, episodes number parsing shouldn't be an issue.

And before you ask - I tried renaming library entry, but to no avail. Changes title in library, but not in quary + eneterying custom quary for every single episode (especially on TV with remote) is so frustrating.

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Apr 23, 2024

@Saderius

  1. yes, same issue as i described above. https://www.themoviedb.org/tv/69291-kobayashi-san-chi-no-maid-dragon/titles#JP
  2. in my opinion: if you change title for yourself only in kodi via kodi UI - it would take same amount of time as changing title in web UI of TMDB. but in first case you made change only for you (so anyone else have to do the same) and in second case you do it for everyone. but you can argue that people are lazy and they prefer to do local change for themselves only rather than change in internet for everybody - and you might be right.
  3. i am not stopping you from implementing such feature :-) i implemented simple feature that covers my needs. but you can implement more complex feature. alternatively, you can create an "feature request" in elementum repo (since this is feature for elementum, not burst - burst just does search of something that was passed to it), but of course it does not mean that someone will implement it.
  4. regardless of my opinion, i guess such feature can be useful for some people, for example there was similar request - Возможность использования пользовательской поисковой строки на трекерах. <trackercustomsearchstring> tvshow.nfo. plugin.video.elementum#332 (use any online translator to translate to your language)

@elgatito what do you think about

option "rename quary" or "custom title search" wchich is saved and applies to the whole show

?


Upd: also, maybe we should use first alternative title, not last, since looks like people add new alternative titles for new seasons, for example, like in link above. although for link in my previous message - 1st romaji title is incorrect. so i guess there is no "silver bullet" approach.

@elgatito
Copy link
Owner

option "rename quary" or "custom title search" wchich is saved and applies to the whole show

@antonsoroko It is not easy to manage such options (how to define, how to store, how to apply, how to re-define)

@Saderius
Copy link

@antonsoroko all I'm saying, current assumptions with titles are wrong not only from UX, but also coding perspective. They are like "hard-coded file paths" and making exceptions for every single title in in db sounds like madness. Coding I know was supposed to make life easier, not to add more "ifs". Don't get me wrong, I'm not trying to insult anyone nor trying to force anything, just stating the obvious. If ya'll know how to code and I know how it "should work", everyone is willing to cooperate - let's make this happen. Not -> "feature request denied due to maitenance only state of plugin" and move along. There is no need for disputes and:

option "rename quary" or "custom title search" wchich is saved and applies to the whole show

?

@antonsoroko
Copy link
Contributor Author

antonsoroko commented Apr 26, 2024

@Saderius i think you miss the point of TMDB. it is user driver database. do you think all those movies and shows are magically appeared in TMDB?
users populate the database. for tv shows and movies it works perfect (or near to perfect).
for anime it works not so good, since torrent releases use romaji instead of english and romaji itself can be spelled differently (as i can see).

making exceptions for every single title in in db sounds

first of all, TMDB is not affiliated with elementum/kodi and vice versa. i have an impression that you confuse TMDB (web site) and Kodi's local DB.

we do not do any exceptions about specific titles in code.
we try to use romaji (b/c of the reason i described above) if it was added to TMDB by users. but of course, since romaji is not real/official language - it can have mistakes (and TMDB does not have strict moderation, so mistakes can easily slip into DB).
but in my experience for the vast majority of titles romaji is correct in TMDB. no idea where you get "for every single title".

if user see that something is wrong in TMDB - user can fix it, for all users. again - there is not magic. if you have not added new movie but you see it - it just means that someone else added it. but if you see that something is missing - that means than nobody added it and you can be a pioneer.

changing title only in your local kodi's db - this can be considered as a solution, but it is hacky and awkward solution. it is not how it "should work", it is a "hack". maybe it is reasonable hack, but still.

in the end, i do not see a big difference between changing title in TMDB and changing title in Kodi's DB.
i would prefer if people would fix thing for everyone, not only for themselves.

in my opinion - the robust solution would be to use some well known Anime API to get Romaji title that was moderated by some trustworthy person who is profound in anime world. Which again mean that someone (instead of other users or you) would add correct Romaji title and then would let anyone to use his/her work.

but we heavily use TMDB which means that for us it would be ideal to use some anime api that can find anime by tmdb id.
but i do not see such api: https://publicapi.dev/category/anime?page=1
which means that we need to do search by english/japanese title from TMDB and then hope that we found correct anime (which would be impossible sometimes, since sites like myanimelist split one anime into several animes based on seasons, example), so then we can use Romaji provided by this 3rd party API (and again we can only hope that their Romaji is correct). so it is not perfect solution.

with all this info - maybe "changing title only in your local kodi's db" is not that bad solution. if user did something wrong (e.g. typed wrong title) - it is problem of that particular user (if user will make the same mistake in TMDB - it would be problem for everyone).

anyway, speaking for myself: right now i do not have desire to implement "integration with anime api" or "manual change title in kodi db" features.


UPD:
also, you should have created a new Issue in elementum repo instead of making conversation in closed PR for burst. nobody will see our conversation.
it makes sense to move our messages to a new elementum issue, so maybe someone else who know how to code can implement this.

see elgatito/plugin.video.elementum#1031

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants