Bug NFO-Files not working for TV-Shows.
#1
Like so many others here, I also have problems adding new shows to my library. All the problems started when thetvdb changed their api. Previously I only used an nfo-file with the complete web-link
Code:
http://thetvdb.com/?tab=series&id=70522&lid=7
This has worked fine for years. But since the change to new link format;
Code:
https://www.thetvdb.com/series/deception-2017
Kodi is unable to scrape new shows using this format. I know that thetvdb is not down because when I hit refresh and choose "Local info found. Ignore and refresh from internet", Kodi finds the correct show or a list of matches and downloads all the information. This is getting annoying as I also have a folder for all of my tv-show that are on cd/dvd and here I'm dependent on using a nfo-file since I'm adding my own genres and tags to the shows. 
Code:
<tvshow>
    <genre>Disc / Done / Comedy</genre>
    <tag>Done / Disc</tag>
</tvshow>
<--
    http://thetvdb.com/?tab=series&id=267489&lid=7
-->
I have tried using
Code:
<tvshow>
<id>330897</id>
</tvshow>
with both imdb-id and thetvdb-id and none work. What is wrong?
PS: Here is a debuglogg from when I tried refreshing a tvshow.Link
Reply
#2
@peanut

You are correct, the new TVDB slugs no longer work in the Parsing NFO file.

Your first link to Farscape http://thetvdb.com/?tab=series&id=70522&lid=7 still works. Using this is not an option as I read on the TVDB forum that this facility will be removed in the near future. I'll see if I can find that post again.

But, using the same show, and using the new slugs, I tried this https://www.thetvdb.com/series/farscape and it no longer worked.

@scudlee is this something you could look into please?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
@scudlee

Here is the thread... https://forums.thetvdb.com/viewtopic.php?f=17&t=48161
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#4
(2018-06-14, 19:43)peanut Wrote: This is getting annoying as I also have a folder for all of my tv-show that are on cd/dvd and here I'm dependent on using a nfo-file since I'm adding my own genres and tags to the shows. 
You do not need to use NFO Files to change the Genres.

You can change the genre via Chorus2 which should be easy to use as you are on a Windows computer. It is definitely easier and faster.

Image

Image

Image

Image
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
This is a very bothersome change.  I was able to quickly bodge together a way to take the slug from the URL, tidy it up, run a search and use the first ID returned. 
Which should work in most cases, since the slug is the actual title, so the search should find a match...  Except you still have to specify a language for the search. 
Most of the slugs are in English, but not all (i.e. if the show doesn't have an English translation), so setting the search language to English isn't a 100% guarantee of success.
The one show I tested that only had a French title returned a completely different show because of a partial English match.  The same thing would have happened had it just been the folder name with no Nfo file.
(Which kind of breaks the whole point of having the URL Nfo.)

Running multiple searches would be possible (but not very practical)... Except unlike the regular search (which Kodi sorts and decides), the scraper would have to pick out which is the correct match, if there are multiple.
Reply
#6
@Karellen
Your way would work if it wasn't for the fact that I currently have 103 tv shows that need, not one but two extra genres. That would mean I would have to add an extra genre 206 times, manually. No doable because every time Kodi is out in a new version I usually redo my entire library from scratch. 

@scudlee 
I have english as my default language, but I also have some shows that are not english. I always change the setting for each of those shows to the appropriate language and refresh that show.

PS: Thanks for the reply.
Reply
#7
(2018-06-15, 21:18)peanut Wrote: Your way would work if it wasn't for the fact that I currently have 103 tv shows that need, not one but two extra genres. That would mean I would have to add an extra genre 206 times, manually. No doable because every time Kodi is out in a new version I usually redo my entire library from scratch. 
By this I assume you mean that those parsing nfo's are pre-existing and a permanent fixture in your folders, and they get used each time you do a library rebuild? It's not as if you are creating them individually now. Is that correct?

Maybe you should look at the Import-Export function of Kodi. See the link in My Signature below.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#8
Yes. They are permanent. When I started out with a media system I was using YAMJ, and if I remember correctly you needed an nfo-file for every movie. Luckily I picked up the good habit of making one for each new movie I ad. 
I tried using the export/import function but newer got it to work. Maybe I'm just unlucky.
Reply
#9
(2018-06-15, 22:26)peanut Wrote: I tried using the export/import function but newer got it to work
Not sure why it wouldn't work for you. It is just clicking a few buttons. It has the benefit of saving your library exactly as you want it, which can then be imported without issue anytime you want.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#10
@scudlee

The TVDB changes certainly seem to be making a mess of things over there.

I notice using the IMDB address still works, as long as the TV Show has it entered.

Is it possible to get this working properly, or will it remain problematic? As you stated, the wrong result makes the use of a Parsing NFO pointless. I would like to make a note on the wiki page once you answer.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#11
(2018-06-15, 14:31)scudlee Wrote: This is a very bothersome change.  I was able to quickly bodge together a way to take the slug from the URL, tidy it up, run a search and use the first ID returned. 
Which should work in most cases, since the slug is the actual title, so the search should find a match...  Except you still have to specify a language for the search. 
Most of the slugs are in English, but not all (i.e. if the show doesn't have an English translation), so setting the search language to English isn't a 100% guarantee of success.
The one show I tested that only had a French title returned a completely different show because of a partial English match.  The same thing would have happened had it just been the folder name with no Nfo file.
(Which kind of breaks the whole point of having the URL Nfo.)

Running multiple searches would be possible (but not very practical)... Except unlike the regular search (which Kodi sorts and decides), the scraper would have to pick out which is the correct match, if there are multiple.
I agree that searches based on titles are not much better than the folder title search and not a good long term solution for forcing a particular series like you can do with an nfo. Can a solution be implemented based on series ID, where the series ID can optionally be put in the NFO file, and the API queried by series ID?   I'n not a programmer so bear with me, and thanks for helping figure out something that works on this issue.
Reply
#12
I can only share what the administration passes on to me, but to my knowledge, SIDs won't be dropped until well after the transition to slugs and - indeed - the switch from v1.5 to a stable v2 can be finalised.

As to the URI dereferrers, it's indeed possible at the current time to adjust the NFO files by simply appending s to the http protocol handler, as SSL was recently introduced to address a number of ongoing security concerns.

Failing that,
Code:
https://www.thetvdb.com/dereferrer/series/SERIESID
(so, herein, https://www.thetvdb.com/dereferrer/series/70522 for Farscape)
should work for the time being.
Reply
#13
To clarify the use of URLs in nfo files, there are two main reasons for why they're used:

1.  They're a string that contains the ID for the show, and uniquely identifies that ID as being for thetvdb (or themoviedb, or imdb, or wherever).
2.  It's easy for a user to obtain.  Just look up the show, and copy-paste the URL.

At no point is the URL actually used as a URL.  Kodi isn't a web browser, and I doubt thetvdb would look kindly on us for trying to scrape information outside the api.  
(I could probably very easily write the code to do that, take the slug URL and scrape the id of the webpage, but that would be bad.)

Anyone with a modicum of technical sense can easily fake an old style URL with a different ID.  Something like:
will still work.  It doesn't matter if the URL is actually valid or not, as long as it matches the regex used by the scraper.  

The dereferrer URL, however, won't work, because the scraper isn't looking for it.  
Now, I could add a check for that URL as well, but that would only make sense if that URL were obtainable in some easily instructed way, i.e. "Go to the page, copy this link on the page".  
If it still has to be manually constructed, it has no real benefit over the old URL.  It's the same amount of effort.

At this point, without an in-api way to reliably convert a slug to an ID, I'd be more inclined to add a check in the scraper for a simple string like "tvdbid=SERIESID", as that's just as good and as uniquely identifiable as either URL, and simpler (to explain and remember).
I am open to suggestions.
Reply
#14
(2018-08-07, 00:35)scudlee Wrote: At this point, without an in-api way to reliably convert a slug to an ID, I'd be more inclined to add a check in the scraper for a simple string like "tvdbid=SERIESID", as that's just as good and as uniquely identifiable as either URL, and simpler (to explain and remember).
So, it turns out at some point between that post and now, thetvdb did in fact add a search option for slugs.  I only noticed because I happened to be looking recently at the API documentation (for other mysterious reasons). 
It definitely wasn't there before.

As such, I've made Pull Requests adding support for slug-based URLs in nfo files.
Reply
#15
@scudlee 

Is there anyway to support the TVDB ID in the scraper as well?

I have a script that grabs the uniqueID from the KODI SQL DB and then generates the tvshow.nfo file with the url for it.
So if I ever need to re-scan in the future, it will choose the correct show.

At the moment, I can't see KODI storing the new slug paths for tvdb, but still see it storing the tvdb IDs.

My work-around at the moment is for my script to grab the uniqueid from DB, then request "https://www.thetvdb.com/dereferrer/series/{uniqueid}" and get the Location of the redirect.
That gives me the new slug urls I can then write the tvshow.nfo.

Also the SHOW search seems a bit broken?

eg. for a folder called "American Horror Story (2011)", the choices are.
"American Horror Story (2011) (en)"
"American Horror Story: Cult (2011) (en)"
"American Horror Story: Coven (2011) (en)"
​​​​​​​"American Horror Story: Hotel (2011) (en)"
​​​​​​​​​​​​​​"American Horror Story: Asylum (2011) (en)"
​​​​​​​​​​​​​​"American Horror Story: Roanoke (2011) (en)"
​​​​​​​​​​​​​​"American Horror Story: Freak Show (2011) (en)"
​​​​​​​​​​​​​​​​​​​​​"American Horror Story: Murder House (2011) (en)"

Appears it's showing all the seasons for a show as well??
Reply

Logout Mark Read Team Forum Stats Members Help
NFO-Files not working for TV-Shows.0