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

HELP - How to translate Season and Episode? #476

Open
Jorman opened this issue Aug 11, 2024 · 14 comments
Open

HELP - How to translate Season and Episode? #476

Jorman opened this issue Aug 11, 2024 · 14 comments
Assignees
Labels
question Further information is requested

Comments

@Jorman
Copy link

Jorman commented Aug 11, 2024

Installation

Docker - develop tag

Describe your Problem

Hi, I recently installed TitleCardMaker and I'm trying to set it up, I don't have any special needs, I'm fine with applying the standard card for each episode, however, I'm having a hard time with having the translation of Season and Episode, I can't get them in my language.

Actually I've been having a hard time with the title names as well, but by searching I saw that moving to the dev, it solved the various problems

Screenshots

Poirot (1989) - S03E11

Preference File

options:
  source: /config/source/
  series: /config/plex-serie-tv.yml
  episode_data_source: plex
  # season_folder_format: "Stagione {season:02}"
  # episode_text_format: "Puntata {episode_number}"
  sync_specials: true
  language_codes:
  - it
  # translation:
  # - language: it

plex:
  url: http://10.0.0.100:32400
  token: token
  watched_style: grayscale
  unwatched_style: unique
  sync:
  - card_directory: /config/cards
  - file: /config/plex-serie-tv.yml
    libraries:
    - Serie TV

# sonarr:
#   url: http://10.0.0.100:8989
#   api_key: api
#   sync:
#   - card_directory: /config/cards
#     downloaded_only: true
#     monitored_only: false
#     plex_libraries:
#       /data/Multimedia/Serie Tv: Serie TV
#   - file: /config/sonarr-serie-tv.yml
#     series_type: standard

tmdb:
  api_key: api
  skip_localized_images: true
  logo_language_priority: it-IT, en

Series YAML

No response

Debug Log

maker.log

@Jorman Jorman added the question Further information is requested label Aug 11, 2024
@CollinHeist
Copy link
Owner

@Jorman Hey - so the season and episode text are controlled by two separate settings. The season titles and episode text format. Most likely you will want to add the non-English versions of these to a template like so:

templates:
  non-english:
    episode_text_format: "Episodio {episode_number}"
    seasons:
      1: My Custom Title 1
      2: My Custom Title 2
      # repeat for as many seasons as you might need
    
series:
  Example Series (2024):
    template: non-english

Let me know if that doesn't work for you

@Jorman
Copy link
Author

Jorman commented Aug 12, 2024

Hi @CollinHeist, thank you for your quick reply!
Exactly, I would like to have "everything" translated non-English, however, I would like it to be all "automatic," of course if that is possible in its current state. As you can see I try to have a very minimal configuration, where I have the program do everything, without specifying any TV series or season, this is because of the convenient sync feature you implemented.
Correct me if I am wrong, but I understand from your example that I have to create a template to apply to each individual series.

I have two questions in this regard:

  1. Is it not possible to make a less restrictive template? Where I just point them to the format of Season and Episode?
  2. If it doesn't exist, what about an option to create an override of Season and Episode text? For example.
options:
  episode_custom_text: "Episodio"
  season_custom_text: "Stagione"

By the way, searching I found this
#452
Am I wrong or is this the same "problem" however related to another language?
It's not clear to me on how to apply it to my configuration though, it seems to be similar to a template, possible?

@CollinHeist
Copy link
Owner

CollinHeist commented Aug 12, 2024

Correct me if I am wrong, but I understand from your example that I have to create a template to apply to each individual series.

Yes you have to create a template, and then you can auto-add it with the add_template sync option.

Is it not possible to make a less restrictive template? Where I just point them to the format of Season and Episode?

Once you've defined the translated text for seasons 1-20 (for example), then it will work for any and all series. And you can already do the episode text format, like I have above.

If it doesn't exist, what about an option to create an override of Season and Episode text? For example.

Like I mentioned, you can already "override" these, but I will not be adding a global season/episode text format option because these are different based on the current card_type. For example, Shape uses {episode_number}. , while Standard uses EPISODE {episode_number}

@Jorman
Copy link
Author

Jorman commented Aug 14, 2024

Hi, in part I get the point, but I think I miss some

[ERROR] [08-14-24 20:40:06.668] Skipping "American Ninja Warrior (2009)" from "/config/plex-serie-tv.yml"
[ERROR] [08-14-24 20:40:06.668] Template "default" not defined
[INFO] [08-14-24 20:40:06.668] Defined templates are ""
[ERROR] [08-14-24 20:40:06.668] Skipping "Breaking Bad - Reazioni collaterali (2008)" from "/config/plex-serie-tv.yml"
[ERROR] [08-14-24 20:40:06.668] Template "default" not defined
[INFO] [08-14-24 20:40:06.668] Defined templates are ""
[ERROR] [08-14-24 20:40:06.668] Skipping "Britain's Got Talent (2007)" from "/config/plex-serie-tv.yml"
[ERROR] [08-14-24 20:40:06.668] Template "default" not defined
[INFO] [08-14-24 20:40:06.668] Defined templates are ""
[ERROR] [08-14-24 20:40:06.668] Skipping "CSI: Vegas (2021)" from "/config/plex-serie-tv.yml"
[ERROR] [08-14-24 20:40:06.668] Template "default" not defined

Here is the configuration, the error his here, but I don't know why, sorry but is pretty new program this for me

options:
  source: /config/source/
  series: /config/plex-serie-tv.yml
  episode_data_source: plex
  # season_folder_format: "Stagione {season:02}"
  # episode_text_format: "Puntata {episode_number}"
  sync_specials: true
  language_codes:
  - it
  # translation:
  # - language: it

templates:
  default:
    episode_text_format: "Episodio {episode_number}"
    seasons:
      1: "Stagione 1"
      2: "Stagione 2"
      3: "Stagione 3"
      4: "Stagione 4"
      5: "Stagione 5"
      6: "Stagione 6"
      7: "Stagione 7"
      8: "Stagione 8"
      9: "Stagione 9"
      10: "Stagione 10"
      11: "Stagione 11"
      12: "Stagione 12"
      13: "Stagione 13"
      14: "Stagione 14"
      15: "Stagione 15"
      16: "Stagione 16"
      17: "Stagione 17"
      18: "Stagione 18"
      19: "Stagione 19"
      20: "Stagione 20"
      21: "Stagione 21"
      22: "Stagione 22"
      23: "Stagione 23"
      24: "Stagione 24"
      25: "Stagione 25"
      26: "Stagione 26"
      27: "Stagione 27"
      28: "Stagione 28"
      29: "Stagione 29"
      30: "Stagione 30"
      31: "Stagione 31"
      32: "Stagione 32"
      33: "Stagione 33"
      34: "Stagione 34"
      35: "Stagione 35"
      36: "Stagione 36"
      37: "Stagione 37"
      38: "Stagione 38"
      39: "Stagione 39"
      40: "Stagione 40"
      41: "Stagione 41"
      42: "Stagione 42"
      43: "Stagione 43"
      44: "Stagione 44"
      45: "Stagione 45"
      46: "Stagione 46"
      47: "Stagione 47"
      48: "Stagione 48"
      49: "Stagione 49"

plex:
  url: http://10.0.0.100:32400
  token: token
  watched_style: grayscale
  unwatched_style: unique
  sync:
  - card_directory: /config/cards
  - file: /config/plex-serie-tv.yml
    add_template: default
    libraries:
    - Serie TV

# sonarr:
#   url: http://10.0.0.100:8989
#   api_key: api
#   sync:
#   - card_directory: /config/cards
#     downloaded_only: true
#     monitored_only: false
#     plex_libraries:
#       /data/Multimedia/Serie Tv: Serie TV
#   - file: /config/sonarr-serie-tv.yml
#     series_type: standard

tmdb:
  api_key: api
  skip_localized_images: true
  logo_language_priority: it-IT, en

@CollinHeist
Copy link
Owner

CollinHeist commented Aug 14, 2024

You can read about templates here, but these cannot be defined in your global preferences file, these go in your sync (series) YAML file - /config/plex-serie-tv.yml in your case.

The logs are telling you there is no "default" template defined

@Jorman
Copy link
Author

Jorman commented Aug 14, 2024

Ah, ok, now I figured out where to place the template, I thought that file was automatically created and didn't need to be edited, got it! Thanks!

Can I ask you two more questions

  1. TMDB doesn't always have all the information about the episodes, that's why on Plex I use TVDB for TV series, at least in my case, it seems more "accurate" then it also has "flaws", is there any way to use it instead of TMDB?
  2. This is directly related to the first one. I realize that not all cards are created for all episodes, I haven't figured out yet whether it is because some are not on TMDB or because it doesn't find the images to download, but it doesn't change the question, can I "force" the creation of the missing cards with the information that Plex has or something similar?

@CollinHeist
Copy link
Owner

TMDB doesn't always have all the information about the episodes, that's why on Plex I use TVDB for TV series, at least in my case, it seems more "accurate" then it also has "flaws", is there any way to use it instead of TMDB?

TVDb is not supported in the non-UI, but you can use Plex directly by changing the episode_data_source option either globally or in a template/series.

This is directly related to the first one. I realize that not all cards are created for all episodes, I haven't figured out yet whether it is because some are not on TMDB or because it doesn't find the images to download, but it doesn't change the question, can I "force" the creation of the missing cards with the information that Plex has or something similar?

Most likely it is because there are no source images. You can change your image source priority to tmdb, plex so TCM grabs images from Plex, but this can take some time as TCM tries TMDb a few times.

@Jorman
Copy link
Author

Jorman commented Aug 14, 2024

Ok, I will also take a look to a UI version, to better understand if can be useful for my case!

I already have the episode_data_source set to plex, so I can "remove" the tmdb section?
What if I change the image source priority only to plex? Is possible? In this way I can skip the TMDB attempt.

@CollinHeist
Copy link
Owner

CollinHeist commented Aug 15, 2024

The UI documentation is here, in case you weren't able to find that.

I already have the episode_data_source set to plex, so I can "remove" the tmdb section?

It's up to you, but I personally wouldn't recommend it. TMDb images are significantly higher quality than Plex/TVDb.

What if I change the image source priority only to plex? Is possible?

All options are described in the wiki, it really depends on how you want to use TCM, and what quality of images you want to grab for Cards

@Jorman
Copy link
Author

Jorman commented Aug 15, 2024

Okay, thank you very much for the advice, I will take it into account, in the end I have no experience with the program, I will make my own considerations, now that I know all the possibilities.
Just a curiosity, do you plan to include a webhooks for the media.scrobble event or for Plex events in general?

@CollinHeist
Copy link
Owner

No problem! Let me know if you have any other questions.

I am not familiar with the Plex webhooks / events, but there is currently a Tautulli integration for the non-UI which can trigger card updates when new episodes are added or existing episodes are watched. This is also implemented in the UI here (and works much faster using an API integration); and using Sonarr webhooks here.

If you have any details on what the media.scrobble event is, I can look at how TCM might interact with it

@Jorman
Copy link
Author

Jorman commented Aug 16, 2024

Thank you like always, very helpful!
I'll take a look also to Tautulli integration too, I don't use Tautulli right now but I will take a look to see if it can be useful on my setup.

I'm not an experienced programmer, certainly not as much as you who developed this nice software, so maybe I won't be able to give you very comprehensive answers, for me webhooks are like "triggers" that send to the specified address the plex event that is activated, for example play, pause, etc, you find more information here
https://support.plex.tv/articles/115002267687-webhooks/

So I think that in your specific case TCM should "stay listening" and when it receives a plex event then it activates/deactivates certain functionality. I'm sorry but I don't know much more than that, I only use it with "subgen", but I would speculate that you could use it, if you want to use it, similarly to the integration with Tautulli, although maybe if you think about it a bit, other uses might come to mind.

@CollinHeist
Copy link
Owner

Thanks, I didn't know Plex natively supported webhooks like that! I'll look at adding an integration with those to TCM.

However, since it requires an active WebServer, that will only work in the UI version of TCM (as v1 does not create any HTTP server which Plex can send events to).

@Jorman
Copy link
Author

Jorman commented Aug 16, 2024

Yep, can be a good new feature to have in the UI version!

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

No branches or pull requests

2 participants