NFO Files and File Naming
#1
Question 
I'm new to XBMC and am trying it out to see if it would be suitable to replace a Boxee Box. I have the current stable release of XBMC (Frodo 12.2). It is running on a Windows 7 (64 bit) machine. My video library is on a NAS and XBMC is accessing the shares via NFS. I'm using the default skin at the moment. All of my TV shows, episodes and movies have NFO files and local thumbnails to deal with Boxee limitations. I thought I would keep these given the amount of work that went into getting the right. And in some cases I have my own custom ordering of seasons or episodes that don't conform to online sources like the TVDB.

Most shows have scanned correctly. A few aren't scanning and one is only scanning a single episode. One example of a show that isn't scanning is "The Hitchhiker's Guide to the Galaxy". It appears in my list of TV shows with fanart and folder image but no episodes are listed.

I've noticed that all of the shows where the episodes are not scanning correctly don't follow the XBMC naming convention. But, I thought the purpose of NFO files was to tell XBMC what was there and consequently file names shouldn't be important. The same thing happens with DVD extras. Where I have a file name that conforms to the XBMC naming convention of 0xNN - Name.avi XBMC is picking it up and adding it to specials for that show. When I don't follow that naming convention XBMC is ignoring the files.

Am I correct in assuming it may be the file names causing the issue? Is there a way of getting XBMC to read NFO files and pick up episodes if they don't follow the XBMC naming convention?

The curious exception is for Doctor Who (2005). XBMC is picking up a single episode which happens to have the format (1080) at the end of its file name, so XBMC is picking up that episode as being season 10 episode 80.

If it helps I've included the contents of a sample tvshow.nfo file and an episode NFO file below.

The tvshow.nfo file contains:
Code:
<?xml version="1.0" encoding="utf-8"?>
<tvshow xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <title>The Hitchhiker's Guide to the Galaxy</title>
  <tvdbid>78142</tvdbid>
  <rating>8.4</rating>
  <genre>Comedy, Sci-Fi</genre>
  <mpaa>TV-PG</mpaa>
  <premiered>1981-01-05</premiered>
  <studio>BBC Two</studio>
  <plot>Don't Panic! This tells the story of Arthur Dent, an average Englishman who life was spared by his friend, who turned out to be an alien, while the planet Earth is destroyed. His friend tells him about the Hitchhiker's Guide to the Galaxy, a guide with anything you ever needed, and wanted to know. They travel across the galaxy, meeting friendly, and not so friendly characters in order to find the great question (the answer being 42).</plot>
  <actor>
    <name>Simon Jones</name>
    <role>Arthur Dent</role>
    <thumb>http://ia.media-imdb.com/images/M/MV5BMjE5NzE2NzA2OV5BMl5BanBnXkFtZTcwMzEyNjI2NA@@._V1._SY314_CR62,0,214,314_.jpg</thumb>
  </actor>
  <actor>
    <name>Peter Jones</name>
    <role>The Book</role>
    <thumb />
  </actor>
  <actor>
    <name>David Dixon</name>
    <role>Ford Prefect</role>
    <thumb />
  </actor>
  <actor>
    <name>David Learner</name>
    <role>Marvin</role>
    <thumb />
  </actor>
  <actor>
    <name>Mark Wing-Davey</name>
    <role>Zaphod Beeblebrox</role>
    <thumb />
  </actor>
  <actor>
    <name>Sandra Dickinson</name>
    <role>Trillian</role>
    <thumb />
  </actor>
  <actor>
    <name>Stephen Moore</name>
    <role>Marvin</role>
    <thumb />
  </actor>
</tvshow>

An example episode NFO file (Episode 1.nfo) contains:
Code:
<?xml version="1.0" encoding="utf-8"?>
<episodedetails>
  <title>Episode 1</title>
  <runtime>32</runtime>
  <aired>1981-01-05</aired>
  <rating>8.5</rating>
  <season>1</season>
  <episode>1</episode>
  <plot>Arthur Dent, a perfectly ordinary Earthman, is surprised to wake up one day to find bulldozers outside his house with orders to knock it down to build a by-pass. He is even more surprised later on in the pub when his best friend Ford Prefect reveals himself to be from a small planet somewhere in the vicinity of Betelgeuse. The two are forced to hitch a lift on one of the advancing Vogon spacecraft which proceed to blow up the Earth to make way for an interspace bypass.

Our two heroes find themselves trapped in a storage room in hyperspace, with only a menacing Vogon guard for company.</plot>
  <credits>Terry Duran (Guest Star) / George Cornelius (Guest Star) / Douglas Adams (Guest Star) / Steve Trainer (Guest Star) / Bill Barnsley (Guest Star) / Steve Conway (Guest Star) / Cleo Rocos (Guest Star) / Andrew Mussell (Guest Star) / Martin Benson (Guest Star) / Joe Melia (Guest Star) / David Grahame (Guest Star) / Douglas Adams (Writer)</credits>
  <director>Alan J. W. Bell</director>
    <streamdetails>
      <audio>
        <channels>2</channels>
        <codec>ac3</codec>
      </audio>
      <audio>
        <channels>2</channels>
        <codec>ac3</codec>
      </audio>
      <video>
        <aspect>1.333</aspect>
        <codec>v_mpeg2</codec>
        <duration>32</duration>
        <height>576</height>
        <scantype>Interlaced</scantype>
        <width>720</width>
      </video>
    </streamdetails>
  </fileinfo>
</episodedetails>
Reply
#2
To solve this riddle completely I need to see your folder structure, and the name of the video files.

- That last .nfo would only work with a video called Episode 1.avi (or another video extension)
- The tvshow nfo seems to have an incorrect <tvshow> tags.
Reply
#3
The files are on my NAS in a share called media. My folder structure is:
Videos\TV Shows\The Hitchhiker's Guide to the Galaxy\tvshow.nfo
Videos\TV Shows\The Hitchhiker's Guide to the Galaxy\Episode 1.mkv
Videos\TV Shows\The Hitchhiker's Guide to the Galaxy\Episode 1.nfo
Videos\TV Shows\The Hitchhiker's Guide to the Galaxy\Episode 1.tbn
Videos\TV Shows\The Hitchhiker's Guide to the Galaxy\folder.jpg
Videos\TV Shows\The Hitchhiker's Guide to the Galaxy\fanart.jpg
...
All the other episodes for that show follow the same naming format, just numbered 2 to 6.

Can you elaborate on your comment that the tvshow.nfo file seems incorrect? I probably have tags in there not used by XBMC, but all of the tvshow.nfo files will have the same tags and it is only a small handful that aren't displaying their episodes. I am assuming that XBMC's XML parser is bright enough to ignore tags it doesn't know.

An example of a show where XBMC is scanning the episodes correctly would be:
Videos\TV Shows\The Martian Cronicles\tvshow.nfo
Videos\TV Shows\The Martian Cronicles\1x01 - The Expeditions.avi
Videos\TV Shows\The Martian Cronicles\1x01 - The Expeditions.nfo
Videos\TV Shows\The Martian Cronicles\1x01 - The Expeditions.tbn
Videos\TV Shows\The Martian Cronicles\folder.jpg
Videos\TV Shows\The Martian Cronicles\fanart.jpg
...

The tvshow.nfo file is
Code:
<?xml version="1.0" encoding="utf-8"?>
<tvshow xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <title>The Martian Chronicles</title>
  <rating>6.7</rating>
  <genre>Sci-Fi</genre>
  <mpaa>TV-PG</mpaa>
  <premiered>1980-01-27</premiered>
  <studio>BBC</studio>
  <plot>Ray Bradbury's subtle, elegant fantasy of man's earliest experiences on an alien planet was given the big treatment in this three-part American adaptation. Rock Hudson starred as the pivotal character of Col. John Wilder, leader of a successful expedition to Mars who finds his sympathies torn, but who is helpless to prevent the planet being raped by American culture.</plot>
  <actor>
    <name>Rock Hudson</name>
    <role>Col. John Wilder</role>
    <thumb />
  </actor>
  <actor>
    <name>Gayle Hunnicutt</name>
    <role>Ruth Wilder</role>
    <thumb />
  </actor>
  <actor>
    <name>Bernie Casey</name>
    <role>Maj. Jeff Spender</role>
    <thumb />
  </actor>
  <actor>
    <name>Christopher Connelly</name>
    <role>Ben Driscoll</role>
    <thumb />
  </actor>
  <actor>
    <name>Nicholas Hammond</name>
    <role>Commander Arthur Black</role>
    <thumb />
  </actor>
  <actor>
    <name>Darren McGavin</name>
    <role>Sam Parkhill</role>
    <thumb />
  </actor>
  <actor>
    <name>Roddy McDowall</name>
    <role>Father Stone</role>
    <thumb />
  </actor>
  <actor>
    <name>Bernadette Peters</name>
    <role>Genevieve Seltzer</role>
    <thumb />
  </actor>
  <actor>
    <name>Joyce van Patten</name>
    <role>Elma Parkhill</role>
    <thumb />
  </actor>
</tvshow>

The first episode's NFO file (1x01 - The Expeditions.nfo) is:
Code:
<?xml version="1.0" encoding="utf-8"?>
<episodedetails>
  <title>The Expeditions</title>
  <runtime>98</runtime>
  <aired>1980-01-27</aired>
  <rating>6.7</rating>
  <season>1</season>
  <episode>1</episode>
  <plot>January 1999: The Zeus Project makes its first manned flight to Mars. Its ultimate goal: colonisation. On Mars, Ylla dreams of the coming astronauts and her husband, Mr K, plots their doom...
The second expedition lands and finds a Mars a deceptively familiar but deadly home from home.
Finally, Col. Wilder's Zeus III expedition arrives to find the Martians dead, wiped out by chicken pox. For one crew member, Spender, the thought of Earth culture tearing the planet apart is too much to bear.</plot>
  <credits>Ray Bradbury (writer) /  Richard Matheson (writer)</credits>
  <director>Michael Anderson</director>
</episodedetails>
Reply
#4
Boxee uses different NFO tags than XBMC, so basically your nfo files are not correct.

The tvshow nfo references an xml schema that I don't believe it should.
It uses a <tvdbid>78142</tvdbid> that should be just <id>78142</id>

Try replacing the entire tvshow.nfo with this :

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tvshow>
  <id>78142<id>
</tvshow>
And let the xbmc scraper find all the other information for you.

You are probably right about the parser: It is bright enough to discard the entire <tvshow> tag and everything in it Smile
It then proceeds to scrape the shows folder name on its own, and manages with some shows and not the others.

Check NFO_files#NFO_Examples (wiki). It is possible that information is outdated a bit, but if you export your library to seperate files XBMC will generate NFO files from your library.
You can than see exactly what tags the version you have supports.

I believe (not completely sure) that you can number your own files any way you want and prevent the scraper from getting it's information online, but to do that you will need proper NFO's.

I do think a faster idea right now would be to just remove all your NFO files, but leave the fanart pictures etc, correct a few names here and there and let XBMC scrape everything itself.
After that is done, export library to seperate files to speed up subsequent rescrapes (in case you want to reinstall or test out a new version etc)
I am intrigued by your own custom ordering of shows that are not correct in theTVDB. How many of these are there ? Are you sure you could not just use the alternate / DVD mode sorting for them (like with Firefly) ?
Reply
#5
Thanks for the comments. The NFO files were generated using a combination of Ember Media Manager and Media Companion. So, aside from the few tags that I changed for Boxee, I assumed the rest would be XBMC compliant. Particularly the XML schema.

I'll try your suggestions and see how I go.

My own custom ordering in some parts could be solved using XBMC's alternate / DVD mode for sorting. Two examples are Firefly and Crusade. The one that can't be solved that way is Doctor Who (2005). I use my own season grouping based on year of showing, not on the published seasons. (e.g. The last season according to BBC spanned 2012 and 2013 but had dramatically different themes and companions.) So the alternates and DVD orders that XBMC would pick up still won't match my preference Smile.
Reply
#6
Ok, I've tried your suggestions. I tried the simple tvshow.nfo file containing just the TVDB id. The scraper wouldn't pick up the show at all. With my old tvshow.nfo the show appeared in my list of TV shows along with its poster and fanart. With just the id it wouldn't show up at all. Commenting out everything but the title and id in my tvshow.nfo file meant the show was picked up by the scraper. The only way I could get the episodes to be picked up was by renaming them to conform to the naming convention. Do you happen to know of a good renaming tool? My Doctor Who (2005) set of episodes is pretty long to fix by hand, but I don't want to just rename them to the TVDB series format.

A related question. When I go into Videos from the main menu and select Files and then TV Shows I find that all of the shows that appear in my list of TV Shows but with no episodes all have check marks beside them in this view. Does anyone know what that means?

I really don't want to make drastic changes to my file names or NFO files as I'm still currently running Boxee for my main viewing area. I'm just testing XBMC. If I do adopt XBMC I'd still like to use Boxee in a secondary viewing area.

Thanks.
Reply
#7
I just don't get it at all.
What is happening with your scraping is really weird, and I can't complain it.

How did you set up your sources and scrapers ?

The check marks mean 'watched' if they are the ones i think you mean.

Please create some screenshots, it will make everything easier to understand.
Optionally create a debug log (wiki).
Reply
#8
I would suggest you try the MediaElch scrapper (http://forum.xbmc.org/showthread.php?tid=136333). I've had nothing but issues using first Media Companion, then switching to Ember. I finally gave up on those and used MediaElch and it is very easy to use, and has even more features than the other scrapers.

To fix some of the problems you're having, you need to use the standard way of naming TV shows... TVshowName.S01E01.ext

Check out the official WiKi where they have tons of examples...http://wiki.xbmc.org/index.php?title=Video_library/Naming_files/TV_shows
Reply

Logout Mark Read Team Forum Stats Members Help
NFO Files and File Naming0