TV Episode NFO files not working as expected; possible bug
#1
Hi all,

I have been trying to put together some test NFO files for my TV shows library but I am running into a problem and I think I have found the cause, which could be a bug in the way Kodi handles the files.

When I create a movie NFO, I can input the data I want to customise, then add a URL for the scraper to look up for the missing data.  For example, I use a brief NFO structure similar to this:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<movie>
  <title>Movie Title</title>
  <plot>Brief description.</plot>
  <tagline>Tagline.</tagline>
  <playcount>1</playcount>
  <tag>BD</tag>
  <dateadded>2017-11-29</dateadded>
</movie>
https://www.themoviedb.org/movie/xxxxxx

The above works perfectly for all my films; I have hundreds of DVD ISOs and Blu-ray media stubs on my NAS so I have all my media information available to me in one place.  The same is also true for TV shows:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tvshow>
  <title>Show Title</title>
  <plot>Brief description.</plot>
</tvshow>
https://www.themoviedb.org/tv/xxxx

It's important to note that I am using the MovieDB scrapers for both movies and TV shows; I want to move away from the TVDB as it provides very poor quality episode images.  So I figured I would be able to follow the same format for each TV episode NFO, for example:

xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
  <playcount>1</playcount>
</episodedetails>
https://www.themoviedb.org/tv/xxxx/season/1/episode/5

I expected the above to cause Kodi to just pull the <playcount> data from the NFO, then scrape the URL for the rest of the episode information (title, plot, etc.).  The idea is to only use the episode NFOs to mark the episodes I have watched, and pull all other data from the MovieDB API.  I want to do this so that if I need to re-scrape my library in future, it is quick and painless.  My advancedsettings.xml is set to import watched status and for movies this works without fail.  However, for TV episodes the watched state ONLY gets imported if there is no URL in the NFO, like this:

xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
  <playcount>1</playcount>
</episodedetails>

The problem with that is, no other information is scraped about the episode, so the title, plot, etc. are missing in Kodi.  If a URL is present, everything within the <episodedetails> tags is ignored by the scraper and it simply pulls all data from the MovieDB API, ignoring my <playcount> tag.  This is not how Kodi works with movie and TV show NFOs.  It normally takes the data in the NFO and puts it in the database, then adds to that information anything that is missing, via the URL to the movie / show.

The problem is, if I can't put a URL to the episode in the NFO, I then need to put all the other info in the NFO, otherwise this information is missing in Kodi's database.  It seems with TV episodes, your NFO can either store all related info OR a URL to the info, but not both.  In movie and TV show NFOs, you can store as much or as little data in the NFO as you want, then supplement that data with a URL to fill in the gaps.

Is this a bug, or is Kodi designed to read TV episode NFO files differently?

This information from the NFO page on the Kodi wiki is true for movies and TV shows, but contradicts what I am seeing with TV episode NFO files:
 
Quote:When Kodi locates the nfo file it will load the *.nfo file and:
  1. If the file is a metadata nfo, Kodi will import the meta-data directly into the library from the .nfo file or
  2. If the file is a parsing nfo, Kodi will parse the nfo file for a direct URL to the scraper info page, then scrape the online metadata.
  3. If the file is a combination nfo, Kodi will parse the nfo file and scrape the online metadata, then import the metadata from the nfo file.
 

I am using what is termed a "combination NFO", but it isn't working as expected. I have also tested all the above with the TVDB scraper as well, and I get the same results, so I don't believe this issue is to do with the scrapers themselves.
Reply
#2
Hi NinjaMonkeyUK

I will move your post to Metadata Add-ons.

When I get back to my computer later, I will set up some dummy files and see if I experience the same as you.
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
Thanks Karellen, hopefully you can replicate the issue!

To be clear, I am doing all my testing on a local Windows installation of Kodi.  My other Kodi boxes are Raspberry Pi 3 running LibreELEC, that run from a MySQL database hosted on my NAS.
Reply
#4
I had a play with this. I created the following...

TV Show NFO
cpp:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tvshow>
<title>Angel</title>
<plot>Angel is an American television series, a spin-off from the television series Buffy the Vampire Slayer. &#x0A;Angel (David Boreanaz), a 240-year old vampire cursed with a conscience, haunts the dark streets of Los Angeles alone. But after he meets a half-demon with mysterious visions, Angel realizes his true purpose: to help those in danger with the hope that he may have a chance to redeem himself and save his own soul. With Cordelia (Charisma Carpenter) and Doyle (Glenn Quinn) at his side, he forms Angel Investigations. He is soon joined by Wesley (Alexis Denisof), Gunn (J. August Richards), Lorne (Andy Hallett) and Fred (Amy Acker), and he will need all their expertise to fight the growing forces of evil, and the supernatural law firm of Wolfram and Hart.</plot>
</tvshow>
https://www.themoviedb.org/tv/2426-angel

Episodes 1-4 in the following format
cpp:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
<playcount>6</playcount>
</episodedetails>
https://www.themoviedb.org/tv/2426-angel.../episode/1

Episode 5
cpp:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<episodedetails>
<playcount>14</playcount>
</episodedetails>

Episode 6 was a full NFO metadata file , which I won't post as it is quite large.


Results-TheMovieDB
Episodes 1-4 scraped fully, but did not include the Playcount.

Episode 5 did not scrape metadata, but did import the playcount

Episode 6 worked as expected importing both playcount and metadata.

Results-TVDB
I changed the links in the nfo files from TheMovieDB to TVDB and retested. This time Episodes 1-5 did not scrape metadata but did import playcount. I also tried adding <episodeguide> to TVShow.nfo, but no change.

@olympia any thoughts?
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
OK so this does seem like a bug then, and not just an issue with my setup. I did start with a clean install of Kodi though, so I didn't think it was an issue on my end.  Let's hope @olympia can see what the issue is! Smile
Cinema: Epson EH-TW9300 | 125" scope fixed frame screen | Panasonic DMP-UB700 | Denon AVR-X4200W | AudioLab M-PWR | Monitor Audio Bronze 7.1.2 Atmos & DTS:X | Kodi (OSMC Vero 4K)
Reply
#6
Easy answer, there is no such thing that episode NFO; Kodi and the scrapers have no support for this at all.

Edit: I suggest you to have a look at the WatchedList addon. Much easier (especially you already have a MySQL setup) to maintain watched status and works perfectly.
Reply
#7
Let me correct myself: there is no episode NFO for scraping. Episode NFOs are only for imports.
Reply
#8
Hi @olympia, thanks for looking into this.  I'm not sure I fully understand your response though.

If TV episode NFO files are not used for scraping, how come they have an affect on the scrape?  I am not using the export / import library feature in the system menus; I am simply cleaning my local database and re-scraping my media.  Is it possible that NFO scraping for TV episodes could be "fixed" to work in the way that is described on the wiki page I quoted in my previous post?

I am curious as to the thought process behind the decision to make the media scrapers behave differently with movie / TV show NFO files to the way it handles episode NFO files.
Cinema: Epson EH-TW9300 | 125" scope fixed frame screen | Panasonic DMP-UB700 | Denon AVR-X4200W | AudioLab M-PWR | Monitor Audio Bronze 7.1.2 Atmos & DTS:X | Kodi (OSMC Vero 4K)
Reply
#9
Alright, I was looking deeper into this just now and I have to admit you might be right, while myself being wrong re this. 

We may look into this in the future, but don't expect this to be resolved very soon. We have other prios to work on with limited resources and to be honest, this issues doesn't seems to effect a lot of people. To be clear, I can't fix this myself as this is not my department.

...and apologies for the confusion, this is one of those rare cases, when I was pretty much confusing myself as well Smile
Reply
#10
Thanks for looking further into this @olympia. Smile

Who is in charge of this side of things?  I don't have much experience with coding but I'd like to take a look at the source to see if I can figure the issue out.  Can you point me in the right direction please?
Cinema: Epson EH-TW9300 | 125" scope fixed frame screen | Panasonic DMP-UB700 | Denon AVR-X4200W | AudioLab M-PWR | Monitor Audio Bronze 7.1.2 Atmos & DTS:X | Kodi (OSMC Vero 4K)
Reply
#11
Did anybody have a chance to look into this further?  It seems it is still broken in Kodi 18.2  Confused
Cinema: Epson EH-TW9300 | 125" scope fixed frame screen | Panasonic DMP-UB700 | Denon AVR-X4200W | AudioLab M-PWR | Monitor Audio Bronze 7.1.2 Atmos & DTS:X | Kodi (OSMC Vero 4K)
Reply

Logout Mark Read Team Forum Stats Members Help
TV Episode NFO files not working as expected; possible bug0