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

FEAT - support multiple languages #6

Open
b3n3w opened this issue Aug 6, 2024 · 7 comments · May be fixed by #65
Open

FEAT - support multiple languages #6

b3n3w opened this issue Aug 6, 2024 · 7 comments · May be fixed by #65
Labels
enhancement New feature or request

Comments

@b3n3w
Copy link

b3n3w commented Aug 6, 2024

Hi there,

first of all thanks for all the effort to develop this state of Trailarr! Really like the idea!
Just tested it on my demo library, which consists out of a lot of foreign language movies (e.g. german). It would be great to support also other languages for the trailers and let the users select which language to choose. English could be used as the default fallback for example.

Once again: Thanks a lot !

@nandyalu nandyalu added the enhancement New feature or request label Aug 6, 2024
@nandyalu
Copy link
Owner

nandyalu commented Aug 6, 2024

@b3n3w not sure if there is a better way to do this, right now it downloads trailer from the youtubeTrailerId it gets from Radarr and Sonarr, which gets it from TMDB and TVDB.

If there is no youtubeTrailerId received then app searches YouTube with ' () <movie/series> trailer', it is possible to add a language in search but wouldn't change the default Radarr/Sonarr trailer ids

@vgarcia007
Copy link

Language select for Trailer would be a good feature.

@nandyalu you say its based on that trailer id it gets from the other arrs. That makes total sense. But i have found no way to override this youtubeTrailerId in one of the arrs to a german trailer.

My Libary consists of many movies for kids. (the dont yet speak english) so it would be a greate feature to have a setting in trailarr to override the search for the trailer with an custom serch parameter.

Maybe something with variables like %title% %year% %language% %someothercustom_string%

@DenisSolonevich
Copy link

DenisSolonevich commented Sep 19, 2024

@b3n3w not sure if there is a better way to do this, right now it downloads trailer from the youtubeTrailerId it gets from Radarr and Sonarr, which gets it from TMDB and TVDB.

If there is no youtubeTrailerId received then app searches YouTube with ' () <movie/series> trailer', it is possible to add a language in search but wouldn't change the default Radarr/Sonarr trailer ids

First of all Thank you for such a nice tool!
My library also not in english. It is in russian.
To solve it I rebuilt your sources with a few modifications and it looks like solved my case.
Almost all 150 movies I have now with FullHD local trailers in russian.

My idea here is to not use provided youtubeTrailerId for localized trailers at all (at least for the first time).
Instead to use your fallback option with YouTube search but with a localized query.
It works really well.

These changes were enough for my case:

  1. In the download_trailer I changed condition:
    if not exclude:
        exclude = []
    if media.yt_id and media.yt_id.endswith("?"):
        video_id = media.yt_id[:-1]
    else:
#... all the rest code until file downloaded
    logger.debug(f"Trailer downloaded for {media.title}, Moving to folder...")
    media.yt_id = video_id + "?"

The question mark is just a my own quickfix marker for localized trailers that do not make any influence to url query.

  1. In the _search_yt_for_trailer I changed query to the local one:
    lang = "ru"
    match lang:
        case "ru":
            search_query += " фильм" if is_movie else " сериал"
            search_query += " русский трейлер hd"

        case "en":
            search_query += " movie" if is_movie else " series"
            search_query += " trailer"

Of course it is not a solution at all.
Just it looks that something like "custom query" and "force yt search" options in Advanced settings will be good enough for the beginning.

@nandyalu
Copy link
Owner

Glad you were able to make it work!

So, to add this to app, I am thinking to add an option for something like Always Search which when enabled would search in youtube even when Radarr provides a youtube trailer id, and another option to customize the search query. Thoughts?

@DenisSolonevich
Copy link

DenisSolonevich commented Sep 26, 2024

Sounds great!
I think it should completely solve this question so far.

@ribera96
Copy link

I would also be interested in being able to select the download language and a custom list of authorized YouTube channels, it would be the best way to get the trailers in Spanish from Spain and not in Latin Spanish or English.

@nandyalu nandyalu linked a pull request Oct 26, 2024 that will close this issue
16 tasks
@Chuacheee
Copy link

Chuacheee commented Nov 26, 2024

There is a plugin called trailer-finder that may give you some help on how to implement multi-language search on Youtube, although it doesn't work on this one.

I am also interested in searching for Spanish trailers from Spain, but I imagine that maybe with some file we can configure the search string.

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

Successfully merging a pull request may close this issue.

7 participants
@DenisSolonevich @ribera96 @nandyalu @vgarcia007 @b3n3w @Chuacheee and others