[SOLVED]Localized episode titles only used if episode has localized description

All your suggestions, requests and ideas for future development
Post Reply
Headhunter
Posts: 3
Joined: 20 Oct 2018, 14:08

[SOLVED]Localized episode titles only used if episode has localized description

Post by Headhunter »

Hi,

I am using the following format to scrape my TV episodes from TheTVDB:

Code: Select all

{n} - {s00e00} - {localize.de.t.replaceAll(/[!?.]+$/).replaceAll(/[\:\/\\]/, "-").replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail()} - {localize.en.t.replaceAll(/[!?.]+$/).replaceAll(/[\:\/\\]/, "-").replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail()} [{hd}-{vf} GER-5.1 ENG-5.1 Sub-GER-ENG]
This works fine to get both German and English epsiode titles, if available.

But if an episode has a German localization only for the title, but not for the description (synopsis), the English title is returned although the German title would be available.

Example series (as of Oct 21st 2018): "Making a murderer" Season 2 Episode 1:
This episode (and all the other episodes in the season) only have German localizations for the title, but not for the description.

What should be returned:
Making a Murderer - S02E01 - Nummer 18 - Number 18 [HD-720p GER-5.1 ENG-5.1 Sub-GER-ENG]

What is actually returned:
Making a Murderer - S02E01 - Number 18 - Number 18 [HD-720p GER-5.1 ENG-5.1 Sub-GER-ENG]

Proof that it works if a localized episode description is available:
Use French instead of German. The French localization is complete (title and description). Edit format would be:

Code: Select all

{n} - {s00e00} - {localize.fr.t.replaceAll(/[!?.]+$/).replaceAll(/[\:\/\\]/, "-").replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail()} - {localize.en.t.replaceAll(/[!?.]+$/).replaceAll(/[\:\/\\]/, "-").replaceAll(/[`´‘’ʻ]/, "'")
.lowerTrail()} [{hd}-{vf} FRE-5.1 ENG-5.1 Sub-GER-ENG]
This returns the following correct output:
Making a Murderer - S02E01 - Le dix-huitième - Number 18 [HD-720p FRE-5.1 ENG-5.1 Sub-GER-ENG]

Please fix that a localized episode title is also used if the episode description is not localized.

Thanks in advance. ;-)

My SysInfo (I use the FileBot version from Microsoft Store):

Code: Select all

FileBot 4.8.4 (r5829)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-10-05 (r536)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 7 GB Max Memory / 58 MB Used Memory
OS: Windows 10 (amd64)
Package: APPX
License: Microsoft Store License
Done ?(?????)?
Last edited by Headhunter on 21 Oct 2018, 12:54, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [BUG]Localized episode titles only used if episode has localized description

Post by rednoah »

The {t} binding will give you whatever TheTVDB API gives back to FileBot. Presumably, it's related to caching, as you're specifically talking about an episode from today, which may or may not have been translated yet, or at least may not have been translated when FileBot last updated it's cached data.

Have you used the Episode panel to check episode information as FileBot sees it based on potentially cached slightly outdated data?

:idea: Note that FileBot may cache episode list data for up to ~5 days, so if data was cached 4 days ago, and then updated 1 day ago, FileBot may still be working with a cached snapshot of the data from 4 days ago.
:idea: Please read the FAQ and How to Request Help.
Headhunter
Posts: 3
Joined: 20 Oct 2018, 14:08

Re: [BUG]Localized episode titles only used if episode has localized description

Post by Headhunter »

rednoah wrote: 20 Oct 2018, 16:47 The {t} binding will give you whatever TheTVDB API gives back to FileBot. Presumably, it's related to caching, as you're specifically talking about an episode from today, which may or may not have been translated yet, or at least may not have been translated when FileBot last updated it's cached data.

Have you used the Episode panel to check episode information as FileBot sees it based on potentially cached slightly outdated data?

:idea: Note that FileBot may cache episode list data for up to ~5 days, so if data was cached 4 days ago, and then updated 1 day ago, FileBot may still be working with a cached snapshot of the data from 4 days ago.
Thanks for your quick answer.

I had the same problems with other, older series, but you are right, the example was bad. So I (coincidentally) tried something completely different: I fetched the episode infos of season 1 of the same series (using the "Episodes" panel of FileBot). That season is 3 years old AND each episode has a full description in German. So my guess was that this should work without problems. But here also, English episode titles were returned instead of German ones (fetching the french titles worked again). So the reason of the error must be something else. And then I noticed that in the Translation Management on the TVDB website for the whole series (where you enter the localized title and description of the series itself), there the German translation of "Making a Murderer" was missing (a description was there, but no title). So I updated the German translation by entering a title (just right now while I am writing this) and will check in the next days if that helped (by refetching the episode infos with FileBot).

If that helps then I guess that somewhere in the scraping process the availability of localized episode titles for a certain language is decided by the availability of a localized series title, either in the FileBot code or in the TVDB API.

EDIT: You wrote that FileBot caches the TVDB data itself, is there a way to force a new fetch of fresh data (e.g. by holding the Control key when clicking the "Find" button in the "Episodes" panel)?
User avatar
rednoah
The Source
Posts: 22976
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [BUG]Localized episode titles only used if episode has localized description

Post by rednoah »

There's a good chance that TheTVDB doesn't enable localization unless at least the series name is localized as well. Not too sure.

You can clear the cache to force a refresh:
viewtopic.php?f=3&t=1996
:idea: Please read the FAQ and How to Request Help.
Headhunter
Posts: 3
Joined: 20 Oct 2018, 14:08

Re: [BUG]Localized episode titles only used if episode has localized description

Post by Headhunter »

It worked! :-)

Today I refetched the epsisode infos (for both seasons of the series) and it returned German episode titles. So I guess in future I will have to check for the series translation if the episode translation will be ignored anytime again. Quite a strange behavior by TheTVDB API as each "data unit" (episode, series) has its own translation management and should not be dependent on the others.

Anyway, Thanks for your quick help! :-)
Post Reply