TVDB addon should find series with names in languages differing from setting

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #1
Let's say you have chosen English as the language of the TVDB scraper. And you include in your source a series with, say, a scandinavian name. The scraper will not find it, even if there is an entry for it on TVDB, with the consequence that some manual action is required to get the metadata fetched and get it added to the library. The reason it doesn't find the show, is that the addon includes the chosen language in the URL parameters when doing the title based search, and unless that title is the name of the series in this chosen language, the TVDB api will produce no results.

Like this:

http://thetvdb.com/api/GetSeries.php?ser...anguage=en
http://thetvdb.com/api/GetSeries.php?ser...anguage=en

This is annoying when it happens, and it's also unnecessary. Plex, for instance, will find the series even if the title is in another language, and still retrieve the metadata in the language chosen.

The fix should be simple:

When doing a title-based search, the addon should set language=all. Like so:

http://thetvdb.com/api/GetSeries.php?ser...nguage=all
http://thetvdb.com/api/GetSeries.php?ser...nguage=all

This will provide at least one hit on the title, which contains the seriesid, which can then be used to retrieve metadata-zips in the language chosen, just like elsewhere in the addon.
(This post was last modified: 2017-05-31 15:04 by kvolden.)
find quote
T-bird_se Offline
Fan
Posts: 390
Joined: Mar 2013
Reputation: 13
Location: Sweden
Post: #2
http://kodi.wiki/view/Add-on:The%20TVDB
Read 2.1 and the text in yellow
Just change the scraper setting for a single folder
find quote
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #3
I know that's possible. You could also make an .nfo-file, or navigate to the folder and explicitly enter which title it should search for. But:

1) It takes unnecessary manual work.
2) Related to your suggested solution specifically, I still want my metadata in English for consistency.

Having the addon do the title based lookup with language=all to get the seriesid, instead of restricting it unnecessarily to the chosen language, will make it just work. It will find the series and add metadata in the language chosen. I don't really see any downsides with this suggested fix.
find quote
T-bird_se Offline
Fan
Posts: 390
Joined: Mar 2013
Reputation: 13
Location: Sweden
Post: #4
(2017-06-01 06:09)kvolden Wrote:  2) Related to your suggested solution specifically, I still want my metadata in English for consistency.

If the data doesn't exist you can't get it in English, so what's the benefit?
find quote
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #5
(2017-06-01 18:41)T-bird_se Wrote:  
(2017-06-01 06:09)kvolden Wrote:  2) Related to your suggested solution specifically, I still want my metadata in English for consistency.

If the data doesn't exist you can't get it in English, so what's the benefit?
But it does exist, that's the point. Maybe I wasn't clear enough, so let me try again.

I have my TVDB addon set to English, because I want my metadata in English. Then I add a Scandinavian TV-Show with the files named after the original title "Midnattssol" – like "Midnattssol S01E01.mkv". The TVDB addon then needs to find the seriesid of this show, in order to get the metadata zip-file, and it sends a request to the following address: http://thetvdb.com/api/GetSeries.php?ser...anguage=en. As you can see, there is no hit, so it doesn't find a seriesid, and so the addon and Kodi just leave it. And it doesn't get a hit because it searches with the title "Midnattssol" and limits the search to English, while the English title for the show is "Midnight Sun".

What I'm suggesting is that it should use "language=all" on the request that attempts to retrieve the sereisid. Like this: http://thetvdb.com/api/GetSeries.php?ser...nguage=all. As you can see, this time it finds the show, and it gets the seriesid: 315426. Now it can use this seriesid like it normally does, and get the metadata-zip in the chosen language (English in my case): http://thetvdb.com/api/1D62F2F90030C444/...all/en.zip.
find quote
Karellen Online
Team-Kodi Member
Posts: 2,862
Joined: Apr 2017
Reputation: 49
Post: #6
Hello kvolden,

I have just looked at your example of Midnight Sun... http://thetvdb.com/?tab=series&id=315426&lid=7

I will assume this is the correct one.

If you click on the below image link, you will see that there is no Scandinavian entry for that show... Nor is there an alternative name for that show. So the scraper could not possibly find it because it does not exist.

https://ibb.co/hVqOkv

If Scandinavian falls under one of the other country listings shown, please excuse my ignorance on European countries. Smile

My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Free Movies/TV Shows | Debug Log (wiki) || Artwork (wiki) | NFO_files (wiki) | Import-Export_library (wiki)
find quote
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #7
That is indeed the show, but you're missing the point. I want the metadata in English. The problem is that it doesn't find the show at all when the title in the filename is different from the English title, when it easily could have.

As far as I can see, this is how the TVDB scraping process works:

1) The show title is parsed from the file name.
2) This title is used in a request to the TVDB api, to get the seriesid – the unique ID of this particular show.
3) The seriesid is then used in a separate request to the api to get the actual metadata in a zip file.

Now. If the files I speak of are named according to, say, the Swedish (original) title, "Midnattssol", this fails. The reason it fails, lies in step 2). The request looking up the title limits all search results to English, because English is my chosen language, and "Midnattssol" is not the English title of the show. Thus it is not currently possible to retrieve the seriesid without some manual intervention.

For illustration, this, again, is the url the addon would use in this scenario, with the title "Midnattssol" and restricting results to English:

http://thetvdb.com/api/GetSeries.php?ser...anguage=en

Please try clicking it, and you will see that it gets no hits. The data-tag containing the search results is empty. There is no seriesid there to retrieve.

BUT! If the request in step 2) did not limit the search results to English, it would get a hit on the show. Not limiting results to English means specifying "language=all" instead of "language=en" in the url of the request:

http://thetvdb.com/api/GetSeries.php?ser...nguage=all

Please try clicking that link as well, and you will see that it does indeed get a hit. Now it can retrieve the seriesid, which is 315426.

Check the url you posted, and you will see that this is indeed the same id: http://thetvdb.com/?tab=series&id=315426&lid=7

Now the addon can continue to step 3), which is to retrieve the metadata in the chosen language for the series with the seriesid retrieved in step 2). In this request it should do what it already does, which is getting the metadata for the given show in the language chosen, using the seriesid from 2).
find quote
Karellen Online
Team-Kodi Member
Posts: 2,862
Joined: Apr 2017
Reputation: 49
Post: #8
Oh yes I do understand your point. I have followed your links and seen the results.

Also, I apologise that I am not up with my European endonyms. Didn't realise Scandinavia was listed as Svenska. The "Midnattssol" title is there.

My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Free Movies/TV Shows | Debug Log (wiki) || Artwork (wiki) | NFO_files (wiki) | Import-Export_library (wiki)
find quote
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #9
(2017-06-02 09:47)Karellen Wrote:  Also, I apologise that I am not up with my European endonyms. Didn't realise Scandinavia was listed as Svenska. The "Midnattssol" title is there.
Ah, I see how that could be confusing. Scandinavian isn't really a language, but in this case a term covering the languages Norwegian, Swedish and Danish (which are very similar). Sorry for not being more clear.
find quote
T-bird_se Offline
Fan
Posts: 390
Joined: Mar 2013
Reputation: 13
Location: Sweden
Post: #10
But with your suggestion you never know if an English record exist, the scraper must guessing, resulting in more traffic on tvdb than necessary
As I see it you shall name the show in it's English name if you want the result in English
(This post was last modified: 2017-06-02 15:13 by T-bird_se.)
find quote
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #11
(2017-06-02 15:12)T-bird_se Wrote:  But with your suggestion you never know if an English record exist, the scraper must guessing, resulting in more traffic on tvdb than necessary
As I see it you shall name the show in it's English name if you want the result in English
I don't understand what you're talking about. With my suggested fix, if you name the files "Midnight Sun SxxEyy", you will get the exact same result as you do now. If you name the files "Midnattssol SxxEyy", it will find exactly the same seriesid and populate the series with exactly the same metadata. The number of requests will remain exactly the same: one to get the seriesid, and one to get the metadata-zip based on the seriesid.
find quote
T-bird_se Offline
Fan
Posts: 390
Joined: Mar 2013
Reputation: 13
Location: Sweden
Post: #12
The scraper doesn't care of the episode name only SxxExx, the shown name comes from the shows folder name
So rename the show folder so you something like this

Midnight sun
-- Season1
--- somenameS01E01.ext (and this can be only S01E01.ext)
--- somenameS01E02.ext
........
(This post was last modified: 2017-06-02 18:11 by T-bird_se.)
find quote
kvolden Offline
Junior Member
Posts: 7
Joined: May 2017
Reputation: 0
Post: #13
(2017-06-02 18:09)T-bird_se Wrote:  The scraper doesn't care of the episode name only SxxExx, the shown name comes from the shows folder name
So rename the show folder so you something like this

Midnight sun
-- Season1
--- somenameS01E01.ext (and this can be only S01E01.ext)
--- somenameS01E02.ext
........
With all due respect, this conversation is becoming somewhat frustrating.

Whether the scraper parses the show title from the folder name or the file name, has no impact on any of the points I have made. The point of this thread is not that I don't know how to work around this, but that this is an annoyance that could easily be fixed so that there is no longer anything to work around.

As you might remember, I opened this thread by pointing out that I am aware that this can be solved by manual intervention, but that this is annoying and unnecessary. This is especially so if you are adding a source with many shows with folders/files named after the show's original non-English title. In quite a few cases, the user might not even have write access to the source where these shows are located. Yes, it would then be possible to navigate to the different folders and tell the scraper what show title to search for, but that – again – is not the point.

There is, as far as I can tell, no negative side effects to the proposed fix. And so I see no reason not to fix this.
find quote
nickr Offline
Team-Kodi Member
Posts: 18,861
Joined: May 2009
Reputation: 387
Location: Christchurch NZ
Post: #14
With all due respect, patches welcome.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote