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

Try to implement better support of Anime titles search #1031

Open
antonsoroko opened this issue Apr 26, 2024 · 7 comments
Open

Try to implement better support of Anime titles search #1031

antonsoroko opened this issue Apr 26, 2024 · 7 comments

Comments

@antonsoroko
Copy link

Anime torrent releases use romaji instead of english.
Currently we use TMDB as source of info for anime. If TMDB has Romaji title (added by users) then we use it.
But romaji itself can be spelled differently (as i can see) or it can be that no one added it.
It this case user can go to TMDB and fix this. But i guess only experienced users are willing to do this.

Thus 2 solutions:

  1. integrate with some anime api that would give us correct romaji titles.
  2. allow user to set "custom title for searching" for whole anime.

full discussion is here elgatito/script.elementum.burst#387 (comment)

summary:

TMDB is user driver database. 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).

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. 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).

@Saderius
Copy link

Saderius commented Apr 26, 2024

First of all, I think you are making wrong assumptions.

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.

No I'm not, and that is the point I'm trying to make.

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".

opposing to

maybe we should use first alternative title, not last

I provided examples, titles included in db were correct (just not in the "right" place), search took wrong names. Every single title (I provided example of AND based solely on that I could probably give you anorther 20 in under 10 min).

and as you wrote before

  1. 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

It is logical in terms "code works as was written", but irrational in terms "as expected". I see it as flawed and unrefined.

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.

I'm pretty sure you are confusing here "all users" with "all users of kodi wchich use elementum addon to watch anime", wchich is friction probably so small to the whole database it becomes vastly insignificant in the whole. Adding duplicates or moving titles around just for the in-app seach to work (i'll say it again) sounds like madness. Besides that, no magic in db -> magic in code.

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.

As hacky and awkward as [torrent-sharing.naming///convention] is, so feels about right.

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.

again, everyone ≠ "all users of kodi wchich use elementum addon to watch anime". Again, if not user provided, then WARNING MULTIPLE TITLES DETECTED -> "pick title to use from TMDB listing" sounds resonable. Well, way better than 0 results from 8 providers when I know for a fact they're there.

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).

I could make a bet, with current approach it would born the same issues. I see no point in changing what isn't broken (API). So here we kinda agree that it's not an issue of database nor quite titles provided by it in general.

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.

and that is totally fine. You are a person, not a nonamed-robot.


In the end, let's state what we know for certain.

  1. API used from TMDB is enough.
  2. Anime searching is a problem due to existance of Romanji.
  3. There is no wastly accepted naming convention for torrent sharing.
  4. "ALL USERS" ≠ "all users of".

ad 2 the same title can have multiple instances of "correct" in Romanji. I see my issue and input are not first on the subject thus far
ad 3 even the same file can have different names (Romanji or not, user error, whatever) from the same provider

@antonsoroko
Copy link
Author

this conversation already looks like "you vs me" :-) but it also looks like you read what i wrote in your own way ("assumptions", right? :-) ), so i will clarify:

we do not do any exceptions about specific titles in code.
opposing to
maybe we should use first alternative title, not last

we do not do any exceptions about specific titles in code. title = name of some video, in this context.
for any video, TMDB has additional so called "alternative titles" section (i posted links to that section before), and we take this info, and if there are several names for 1 language - we take last name.
thus, my thought about first vs last was for every type of video (movie/show/anime), every language.
it was not about some specific anime title/video, or all animes, or Romaji. thus -> "we do not do any exceptions about specific titles in code."

(there is also "translations" section - it has 1 name per language. but it does not have unofficial things like romaji.)

I'm pretty sure you are confusing here "all users" with "all users of kodi wchich use elementum addon to watch anime",

almost every popular video pirating addon for kodi (that i saw) uses TMDB. also some popular standalone torrent streaming applications also use tmdb.
i will not say that "I'm pretty sure" that they also use alternative titles because i have not read their code. but it is possible.
also, i would note that adding romaji to TMDB probably is most beneficial for pirates, which makes me think that not only we use romaji from "alternative titles" section.


Again, if not user provided, then WARNING MULTIPLE TITLES DETECTED -> "pick title to use from TMDB listing" sounds resonable.

i do not understand what you wanted to say. what multiple titles? from what source? pick what title and how?
what do you mean by "multiple titles"? a. multiple names in 1 language? or b. name in multiple languages?

(about "a." - as i wrote above "translations" section is "1 to 1" and "alternative titles" section is "many to 1" but we store only 1 name per language, the last one. and data from "translations" section override data from "alternative titles" section. anyway, in the end we have only 1 name per 1 language. everything can be changed of course.)

also note, that romaji is useful only for "english" trackers. there are a lot of language-specific torrent trackers that use their own language. so to search in such trackers you not need hacks like romaji, you just need a translated name/title from TMDB.

also, trackers like nyaa also have torrents with english anime name, example. that's why we use title:en:jp for nyaa, so it searches english (usually avaialable) name and romaji (if available) name. i already described this in burst topic.


but in general, implementing a way to set "custom title for searching" for whole show/anime is fine idea. probably it would be easier than integrate with some anime api or trying to write ui to select title/name from from all TMDB's "alternative titles".

@antonsoroko antonsoroko changed the title Better support of Anime titles search Try to implement better support of Anime titles search Apr 29, 2024
@elgatito
Copy link
Owner

Good that I don' t watch anime, so I don't have those problems that you do.

If the 'normalized' title (Romaji?) has one title, and specific torrent website has another title then there are only 2 options (as I see it):

  1. Change 'normalized' title on TMDB.
  2. Set custom title internally in Elementum, so that title to be used in search addons.

Generally, each item has 1 translation per language, so there would be always wrong/correct titles, and Elementum does not allow having multiple titles per single language.
That is a known problem that humans create torrents with the names they write, instead of a some standard name.

@elgatito
Copy link
Owner

The simpliest way if probably adding a new action into context.elementum to set custom title for movie/show (not season/episode) and then if can be transferred to search addons (replacing one of the default languages).

That is how I see it.

@antonsoroko
Copy link
Author

antonsoroko commented Apr 29, 2024

@elgatito
I guess you mean something different than "play with modified title" menu item in context.elementum addon, because that one is temporary and only for "one time" search. I mean , I don't understand the idea.

@elgatito
Copy link
Owner

I guess you mean something different than "play with modified title" menu item in context.elementum addon, because that one is temporary and only for "one time" search. I mean , I don understand the idea.

Yes. "Play with .." only saves selected torrent to active item, and not the query that was used to search.

@antonsoroko
Copy link
Author

so i am confused. how exactly

adding a new action into context.elementum to set custom title for movie/show (not season/episode) and then if can be transferred to search addons (replacing one of the default languages).

should work?

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

No branches or pull requests

3 participants