Localize Bug on themoviedb (TV)

All your suggestions, requests and ideas for future development
Post Reply
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Localize Bug on themoviedb (TV)

Post by kim »

This does not work proper on themoviedb (TV), but works ok on thetvdb

Code: Select all

{def infoDK = Localize.Danish; infoDK.n}/{
def infoDK = Localize.Danish; infoDK.n}{
'.'+s00e00}{
def infoDK = Localize.Danish; '.'+infoDK.t.space('.')}
testfile = Cheers.S04E10.DK.The.Bar.Stoolie

also, there is something wrong with this in the GUI

Code: Select all

def infoDK = net.filebot.WebServices.TheMovieDB_TV.getSeriesInfo(info.id, new Locale ('da', 'DK'));
infoDK.name
should this not give the Danish title (genres is in Danish, so it is getting the info) ?
<net.filebot.web.SeriesInfo@8d database=TheMovieDB::TV order=Airdate language=en id=141 name=Cheers aliasNames=[] certification=null startDate=1982-09-30 genres=[Komedie] network=NBC rating=7.5 ratingCount=140 runtime=24 status=Ended>
I'm using this in my custom script (htpc.groovy) to get the TV info from themoviedb, is works for the default (English), but is this the correct way ?

Code: Select all

seriesInfo = TheMovieDB_TV.getSeriesInfo(seriesId, locale)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Localize Bug on themoviedb (TV)

Post by rednoah »

1.
What does "does not work properly" mean? Please provide expected value and actual value.


2.
Should it? Does it not work for anything? I guess it's defaulting to English for some reason?

It should fundamentally work as far as I can tell:

Code: Select all

$ filebot -list --q Firefly --db TheMovieDB::TV --lang German
Firefly - Der Aufbruch der Serenity - 1x01 - Serenity
Firefly - Der Aufbruch der Serenity - 1x02 - Schmutzige Geschäfte
...
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Localize Bug on themoviedb (TV)

Post by kim »

The Danish show name of "Cheers" is "Sams bar"
https://www.themoviedb.org/tv/141-cheers?language=da-DK

1.
it looks like n (name) is null (Binding "n": undefined), but t (title) works = result "/.S04E10.Episode.10"
(Episode xx is the default when no title is set in that language)

Code: Select all

{def infoDK = Localize.Danish; infoDK.n}/{
def infoDK = Localize.Danish; infoDK.n}{
'.'+s00e00}{
def infoDK = Localize.Danish; '.'+infoDK.t.space('.')}
with this, it only gives the English show name, properly because the Danish is null or it only gives back the original name ?:

Code: Select all

{def infoDK = net.filebot.WebServices.TheMovieDB_TV.getSeriesInfo(info.id, new Locale ('da', 'DK'));
infoDK.name}
I'm not sure what the "object" part should do, but "null - 4x10 - Episode 10":

Code: Select all

{def infoDK = Localize.Danish;
infoDK.object}
"TV Shows/Season 04/null - S04E10 - Episode 10"

Code: Select all

{def infoDK = Localize.Danish; infoDK.plex}
2.
when you use german like so, this is what i mean by the "default":
"filebot -list --q Firefly --db TheMovieDB::TV --lang German"
so you cant test it like that
same in the GUI format, the "default" language is set to English, but with the format I get the Danish info, by using Localize and TheMovieDB_TV.getSeriesInfo (or trying to)

3.
the problem with "{def infoDK = net.filebot.WebServices.TheMovieDB_TV.getSeriesInfo(info.id, new Locale ('da', 'DK')).dump()}" is that it does not contain e.g. the title (The Bar Stoolie) forcing me to use "Localize.Danish"


EDIT: you can also try:

Code: Select all

{def infoDK = Localize.German; infoDK.n}
result = /.S04E10.Folge.10 aka null
Titel (Deutsch) is locked making the German name = Cheers BUT this does not work
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Localize Bug on themoviedb (TV)

Post by rednoah »

I can't reproduce the problem. Here's what I get:

Code: Select all

filebot -list --q Cheers --db TheTVDB --lang English --format "{localize.Danish.plex.name}"

Code: Select all

Sams bar - S01E01 - Give Me a Ring Sometime
Sams bar - S01E02 - Sam's Women
...

Also works for TheMovieDB:

Code: Select all

filebot -list --q Cheers --db TheMovieDB::TV --lang English --format "{localize.Danish.plex.name}"

Code: Select all

Sams bar - S01E01 - Episode 1
...
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Localize Bug on themoviedb (TV)

Post by kim »

well I get this:
filebot -list --q Cheers --db TheMovieDB::TV --lang English --format "{localize.Danish.plex.name}"
null - S01E01 - Episode 1
null - S01E02 - Episode 2
null - S01E03 - Episode 3
null - S01E04 - Episode 4
null - S01E05 - Episode 5...
If this is a local problem, what can I try ?
I'm using FileBot 4.7.13 (r5215)
JRE: Java(TM) SE Runtime Environment 1.8.0_144
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
OS: Windows 10 (amd64)
filebot -clear-cache, does not make any difference

btw: I think it may be working, some of the time, but most of the time it's not.

EDIT:
I just tried this (same problem...):
filebot -list --q Cheers --db TheMovieDB::TV --lang Danish --format "{plex}"
TV Shows\Season 01\null - S01E01 - Episode 1
TV Shows\Season 01\null - S01E02 - Episode 2
TV Shows\Season 01\null - S01E03 - Episode 3
...
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Localize Bug on themoviedb (TV)

Post by kim »

I tried it on my Ubuntu 16.04.3 LTS pc (also FileBot 4.7.13 (r5215)):
filebot -list --q Cheers --db TheMovieDB::TV --filter "s == 1" --lang Danish --format "{plex}"
Fetch failed: Try again in 5 seconds (2 more) => java.net.UnknownHostException: api.themoviedb.org
Fetch failed: Try again in 10 seconds (1 more) => java.net.UnknownHostException: api.themoviedb.org
Apply filter [s == 1] on [301] items
Include [null - 1x01 - Episode 1]
Include [null - 1x02 - Episode 2]
Include [null - 1x03 - Episode 3]
...
TV Shows/Season 01/null - S01E01 - Episode 1
TV Shows/Season 01/null - S01E02 - Episode 2
TV Shows/Season 01/null - S01E03 - Episode 3
...
"Fetch failed: Try again in 5 seconds (2 more) => java.net.UnknownHostException: api.themoviedb.org"
this happen 99% of the time, can I do something about it ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Localize Bug on themoviedb (TV)

Post by rednoah »

1.
I can reproduce the problem now. Some sort of regression with the latest revision and TheMovieDB for TV. I'll have a look.

:idea: EDIT: I can no long reproduce the problem after clear cache.


2.
This is an unrelated generic network issue. Google will help you find a solution.

Code: Select all

java.net.UnknownHostException: api.themoviedb.org
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Localize Bug on themoviedb (TV)

Post by kim »

As I wrote: "filebot -clear-cache, does not make any difference"
... for me
and
"btw: I think it may be working, some of the time, but most of the time it's not."
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Localize Bug on themoviedb (TV)

Post by rednoah »

In this case, it's likely the TheMovieDB is sending back different response data some of the time. You can the JSON data that TheMovieDB sends back with these option:
viewtopic.php?t=3913

If we see different response data for the same query, then we can make a bug report on TheMovieDB.


:idea: EDIT: Nevermind. Found the root cause.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Localize Bug on themoviedb (TV)

Post by kim »

looks like that fixed the localize part, but this still only gets the English show name
is it the correct way to write it ?
filebot -list --q Cheers --db TheMovieDB::TV --lang English --format "{def infoDK = net.filebot.WebServices.TheMovieDB_TV.getSeriesInfo(this.id, new Locale ('da', 'DK')); infoDK.name}"
Cheers
Cheers
...

btw: for some reason some shows have more then 1 "runtime" and now filebot only gets the first one, this could be a problem, same with network ?

EDIT:
tried this
filebot -list --q Cheers --db TheMovieDB::TV --filter "s == 1" --lang Danish --format "{def infoDK = net.filebot.WebServices.TheMovieDB_TV.getSeriesInfo(this.id, new Locale ('it', 'IT')); infoDK.name}"

Apply filter [s == 1] on [301] items
Include [Sams bar - 1x01 - Episode 1]
Include [Sams bar - 1x02 - Episode 2]
Include [Sams bar - 1x03 - Episode 3]
...
Cheers
Cheers
Cheers
...
It should give back "Cin Cin", not Cheers or Sams bar
what do the "Include" mean, just the info from the org. query ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Localize Bug on themoviedb (TV)

Post by rednoah »

1.
The series info object generally uses the original title as name property. Doesn't matter either way though.

2.
Include ... means that this episode was selected by your filter expression:

Code: Select all

Apply filter [s == 1] on [301] items
Include [Sams bar - 1x01 - Episode 1]
Include [Sams bar - 1x02 - Episode 2]
...
:idea: Please read the FAQ and How to Request Help.
Post Reply