Pages

Aug 16, 2013

Importing and Exporting XBMC Libraries.

I just went thru the process of figuring out the best way to Export and Import XBMC libraries in such a way that I can export a library from one XBMC installation and import that same library into another XBMC installation without using the Internet (my Parents don't have internet!).

So I'm about 99% sure I've found the cleanest way to do it.


  • Put a bunch of movie files in a folder somewhere.
  • make sure you're connected to the Internet at this point and have XBMC installed.
  • in XBMC go to Videos / Browse / Files / Add Videos...

  • Enter the path to your folder
  • Give the Media Source a name (I always use "Movies")
  • click OK.

  • Select TheMovieDB.org under "This directory contains..."
  • uncheck "Movies are in separate folders that match the movie title"
  • uncheck "Scan recursively" (i always have my movies in one folder)
  • uncheck "Exclude path from library updates"
  • click OK

  • let it Scan the internet and build your video library.
  • When it's done go to XBMC / Settings / Videos / Library
  • click Export video library

  • specify separate files

  • say Yes to export thumbnails and fan art

  • say No to export actor thumbs. I haven't experimented with the Actor thumbs yet as I want to save space on the Raspberry Pi for more movie cover thumbnails.

  • say Yes to Overwrite old files.

  1. Now you should have 2 additional files for every movie file.
    • A .nfo file (xml file holding meta data for the corresponding movie file
    • A -poster.jpg file
  2. The .nfo files will contain a bunch of useless tags with URL addresses that point to the movie posters on the internet. This is useless if you want to be able to import without using the internet, so we're going to need to strip out the tags from all the .nfo files and add our own tags using the local MovieName-poster.jpg file.
  3. The following command line magic will strip out the tags from all the .nfo files and add our own tags using the local MovieName-poster.jpg files:
    1.  perl -ni -e "print unless <thumb" *.nfo
    2. for f in *.nfo; do perl -pi -e "s/\/mpaa>/\/mpaa>${f//.nfo/-poster.jpg}<\/thumb>/" "$f"; done;
  4. Now copy your movie folder to any other computer with XBMC installed and go thru steps 3 - 12. You will NOT need the internet to build your library! You have everything you need with the .nfo and .tbn files.


1 comment:

  1. This comment has been removed by the author.

    ReplyDelete