Kodi Prefers File Name Over NFO When Scraping Season/Ep Numbers
#1
So I'm using an application called TubeSync to download YouTube channels and build NFO files for them as there is no data on these channels in TheTVDB or the likes.  I'm running into an issue where number sequences in the filenames are being interpreted as the episode and filename and ignoring the NFO.  Here's an example:

File Name: Phil's Computer Lab 2014-10-08 Roland SC-55 vs AWE64 Gold Descent [1080p WEB-DL].mkv

Kodi reads this file as being 'Season 1 Episode 64' during scrape, I'm guessing from the 'E64' in 'AWE64'.

However I also have an NFO file with the name: Phil's Computer Lab 2014-10-08 Roland SC-55 vs AWE64 Gold Descent [1080p WEB-DL].nfo

Code:
<?xml version='1.0' encoding='utf8'?>
<episodedetails>
  <title>Roland SC-55 vs AWE64 Gold Descent</title>
  <showtitle>Phil's Computer Lab</showtitle>
  <season>2014</season>
  <episode>49</episode>
  <ratings>
    <rating name="youtube" max="5" default="True">
      <value>None</value>
      <votes>272</votes>
    </rating>
  </ratings>
  <plot>Thank you for watching this video! Hope you found it interesting, please leave a comment and subscribe to the channel! 

 

Disclosure: Some links in this description are affiliate links. I receive a small commission when you make a purchase. There are no additional costs to you. 

Support PhilsComputerLab:
Amazon.com: https://amzn.to/3fvz8sg
AliExpress: http://s.click.aliexpress.com/e/b6c7Xgiy
eBay US: https://ebay.us/bKzLAW
ebay UK: https://ebay.us/Bs9Z0u
eBay Germany: https://ebay.us/k3bPol
eBay Canada: https://ebay.us/CD6KZz
eBay Australia: https://ebay.us/eon4Ys
GOG: https://adtr.co/eqi5mb
PayPal donation: https://www.paypal.me/PhilsComputerLab</plot>
  <thumb>Phil's Computer Lab 2014-10-08 Roland SC-55 vs AWE64 Gold Descent [1080p WEB-DL].jpg</thumb>
  <mpaa>0</mpaa>
  <runtime>235</runtime>
  <id>D9iyi7_BNRQ</id>
  <uniqueid type="youtube" default="True">D9iyi7_BNRQ</uniqueid>
  <studio>PhilsComputerLab</studio>
  <aired>2014-10-08</aired>
  <dateadded>2024-04-27 23:54:20</dateadded>
  <genre>Science & Technology</genre>
</episodedetails>

This NFO's XML clearly provides the information that this file is Season 2014, Episode 49, and Kodi ignores this entirely, opting to use it's own attempt to guess from the filename instead.

I understand what Kodi is trying to do, but when provided with an NFO file with the information, shouldn't that be a higher authority than it trying to figure it out from the filename?

This is not the only example from this YT channel of this happening, it's happening to about 20 videos, some of which literally have things like 'S1E2' in their episode titles cause they did 'a few videos in a series' and titled them that way.

I can provide logs later, I'm just short on time this morning to do a nice clean Log with any unrelated nonsense not happening.
Reply
#2
There is no tvshow show tag in the nfo which is mandatory, see https://kodi.wiki/view/NFO_files/TV_shows
Reply
#3
Actually you probably need both a fake tv show nfo and fake episode nfo.
Reply
#4
(2024-04-28, 16:06)DJ_Izumi Wrote: I understand what Kodi is trying to do, but when provided with an NFO file with the information, shouldn't that be a higher authority
For some data, yes. Season and Episode is set by the filename numbering.
Read the Introduction and see note in the relative tags... https://kodi.wiki/view/NFO_files/Episodes
NFO files are essentially just a database dump. Everything is exported, and while most is imported on scan certain values are not, for various reasons.

Name the episode S2014E49 Phil's Computer Lab 2014-10-08 Roland SC-55 vs AWE64 Gold Descent [1080p WEB-DL].mkv and it should work.
I assume you also have the tvshow.nfo file in place.
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
(2024-04-28, 18:31)jjd-uk Wrote: There is no tvshow show tag in the nfo which is mandatory, see https://kodi.wiki/view/NFO_files/TV_shows
So, I'm not generating these NFOs, however if that's a required tag, I'll mention it to the dev as they've responded to some other issues I arose.  Like TubeSync was adding emoji from YouTube into the NFO and... Yeah that did not play well with Kodi either.
Reply
#6
(2024-04-28, 18:36)jjd-uk Wrote: Actually you probably need both a fake tv show nfo and fake episode nfo.
Yeah TubeSync does not generate a tvshow.nfo so I had to generate my own, but the issue at hand is episode numbers.
Reply
#7
(2024-04-28, 18:31)jjd-uk Wrote: There is no tvshow show tag in the nfo which is mandatory, see https://kodi.wiki/view/NFO_files/TV_shows
It's only mandatory in the tvshow.nfo file.
But the example posted by dj_izumi is an episode nfo file.
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
(2024-04-28, 20:58)Karellen Wrote:
(2024-04-28, 16:06)DJ_Izumi Wrote: I understand what Kodi is trying to do, but when provided with an NFO file with the information, shouldn't that be a higher authority
For some data, yes. Season and Episode is set by the filename numbering.
Read the Introduction and see note in the relative tags... https://kodi.wiki/view/NFO_files/Episodes
NFO files are essentially just a database dump. Everything is exported, and while most is imported on scan certain values are not, for various reasons.

Name the episode S2014E49 Phil's Computer Lab 2014-10-08 Roland SC-55 vs AWE64 Gold Descent [1080p WEB-DL].mkv and it should work.
I assume you also have the tvshow.nfo file in place.

The problem here is that I have no control over that. Smile  TubeSync's filename tool doesn't allow 'episode number' as a value in the filename.  Only dates.  Which I thought, since it is in the NFO files, it'd work.  And it actually does work for any file where Kodi fails to find any numbers in the filename to interpret as an episode number.  Those scrape as I'd like.  However anything with a number sequence it reads as an episode number it then ignores the episdoe numbering in the provided NFO file.

I'm just surprised that an NFO file isn't the highest authority when determining episode number and such.
Reply
#9
I just remembered, there is now a date option to naming. It was implemented for v21. Maybe that is why you have had some success.
Check the table here... https://kodi.wiki/view/Naming_video_file...sode_Files
I've never tested it, so can't comment on it.
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
(2024-04-29, 01:30)Karellen Wrote: I just remembered, there is now a date option to naming. It was implemented for v21. Maybe that is why you have had some success.
Check the table here... https://kodi.wiki/view/Naming_video_file...sode_Files
I've never tested it, so can't comment on it.
The 'Local Information Only' scraper has no options what so ever, the 'Options' button is greyed out even.  There's no way to use that functionality.

It would seem that, when failing to find any text that fits the 'S00E00' format, it falls back to using what's in the NFO file generated, but for those with where it has text it mistakes for an episode number, it prioritizes that data and I just can't work my away around it.
Reply
#11
If I modified the output to put the entire episode title, which is only there for easy human viewing of the file system, into square brackets, would Kodi then ignore that?
Reply
#12
(2024-04-29, 03:05)DJ_Izumi Wrote: The 'Local Information Only' scraper has no options what so ever, the 'Options' button is greyed out even.  There's no way to use that functionality.
It's not the scraper that finds that. It is VideoInfoScanner that finds it and passes it onto the scraper. As I said, I have never used the date format in my episodes, so don't know how well it works.

(2024-04-29, 03:05)DJ_Izumi Wrote: It would seem that, when failing to find any text that fits the 'S00E00' format, it falls back to using what's in the NFO file generated,
Kodi will NEVER use the season and episode tags in the nfo file. So what you are saying cannot happen.

(2024-04-29, 03:14)DJ_Izumi Wrote: If I modified the output to put the entire episode title, which is only there for easy human viewing of the file system, into square brackets, would Kodi then ignore that?
It looks for the episode numbering. The table I linked displays a number next to each numbering format. 1 being the first check and safest check and 7 being the lowest and last check and the most unreliable.
Brackets won't change the search for numbering.
But if you are going to the extent of editing the title to add brackets, just edit the title and add the numbering S01E01 at the start.
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
#13
(2024-04-29, 04:09)Karellen Wrote: Kodi will NEVER use the season and episode tags in the nfo file. So what you are saying cannot happen.

 I'm sorry but this is not accurate. Most of the files must have pulled their episode numbering from NFO because that was their only source. Here's an example:

Filename: Phil's Computer Lab 2016-03-23 External BIOS flashing with Genius G540 flasher programmer [1080p WEB-DL].mkv

matching NFO file's contents:
Code:
<?xml version='1.0' encoding='utf8'?>
<episodedetails>
<title>External BIOS flashing with Genius G540 flasher programmer</title>
<showtitle>Phil's Computer Lab</showtitle>
<season>2016</season>
<episode>11</episode>
<ratings>
<rating name="youtube" max="5" default="True">
<value>None</value>
<votes>386</votes>
</rating>
</ratings>
<plot>Thank you for watching this video! Hope you found it interesting, please leave a comment and subscribe to the channel!



Disclosure: Some links in this description are affiliate links. I receive a small commission when you make a purchase. There are no additional costs to you.

Support PhilsComputerLab:
Amazon.com: https://amzn.to/3fvz8sg
AliExpress: http://s.click.aliexpress.com/e/b6c7Xgiy
eBay US: https://ebay.us/bKzLAW
ebay UK: https://ebay.us/Bs9Z0u
eBay Germany: https://ebay.us/k3bPol
eBay Canada: https://ebay.us/CD6KZz
eBay Australia: https://ebay.us/eon4Ys
GOG: https://adtr.co/eqi5mb
PayPal donation: https://www.paypal.me/PhilsComputerLab</plot>
<thumb>Phil's Computer Lab 2016-03-23 External BIOS flashing with Genius G540 flasher programmer [1080p WEB-DL].jpg</thumb>
<mpaa>0</mpaa>
<runtime>228</runtime>
<id>b_dEcShoR5Y</id>
<uniqueid type="youtube" default="True">b_dEcShoR5Y</uniqueid>
<studio>PhilsComputerLab</studio>
<aired>2016-03-23</aired>
<dateadded>2024-04-27 23:54:18</dateadded>
<genre>Science & Technology</genre>
</episodedetails>

And Kodi scraped this file as Season 2016, Episode 11, I'm looking at it right now in Kodi, the interface shows it as 2016x11.

Kodi has no other source of information for this other than the NFO file that was provided for it. There are no episodes in TheTVDB (There is an entry for the SERIES but no one has ever entered any EPISODES into TVDB) and Kodi is using local information only. You say 'Kodi will NEVER use the season and episode tags in the nfo file.' but where else did Kodi get that information from when scraping?

Image
Reply
#14
Hmm, let me have a play with it, using your above data, when I get back home in a couple of hours.
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
#15
I'm guessing it has something to do with that new date numbering.
The date is found in your file and recognised, then those tags are read. I wonder.
Can't seem to find the PR for it at this moment.
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

Logout Mark Read Team Forum Stats Members Help
Kodi Prefers File Name Over NFO When Scraping Season/Ep Numbers0