How to save your Kodi library

How to save your Kodi library so you never have to download it again!

Yep, you read that right!Β  Actually, this guide does away with exporting and importing mostly.Β  I got tired of waiting for my large collection to download every time I did an upgrade or removed a Kodi source/share.Β  And it wasn’t too hard to figure out a way around it.

A nice side effect of this guide is that you will easily be able to tell which content is not being detected by Kodi.Β  You may not realise it, but if you have a large collection, often Kodi doesn’t detect things and there doesn’t seem to be any reason to which it will or won’t detect during the library scan, but it can miss quiteΒ  a few things off from time to time.Β  Another nice side effect of this method is that you won’t have issues with path incompatibilities (causing your Kodi library import to fail)Β  if you’ve changed your sharename, have multiple Kodi clients etc.

OK, you’re not going to believe how easy this is. πŸ™‚

First off, you’re going to need to do a library scan from the internet, once, as per normal.

Add items to your Kodi library

From the main screen go to video.Β  Click or press Enter on the Add source item and add a media source if you don’t already have one.

Ensure you go into “Set Content” and change the item, “This directory contains” to Movies or whatever content you have in your source.Β  If you already had a source set up, you will need to edit it by selecting it, pressing C (or right clicking the mouse) and choosing edit source.

Also make sure you select, “Run Automated scan” and “Scan Recursively”, under Settings to ensure you have “enable fanart” enabled. Click OK twice to get out.

If you were creating a new source it should now scan it automatically.Β  If you had an existing source you may need to select it, press C (or right click) and choose, “Scan for new Content” as sometimes they don’t accept the automated scan request.Β  Note:Β  It is not until you do this scan that the Kodi Library Mode will become active.

Depending on the size of your library and speed of your internet connection, you may need to wait a while, maybe even an hour .Β  When it’s completed, select and make active the Library Mode item under Video.Β  At this point you should be seeing a screen with Movies, Recently added movies and Playlists on it.Β  Click on Movies, then Title and you should be looking at the the glorious Kodi Library goodness!

Exporting your library

OK so you’ve spent an hour waiting for your library to download and you know you don’t ever want to do that again!Β  The fix is quite easy.

Ensure you have write access from Kodi to where your library is stored.Β  If you are running from a Samba share you will need to ensure the user you are connecting to the share as, has read, write and execute access, otherwise this will not work.

In the Kodi library, press C or right click and select settings.

Scroll down and select the Library Menu Item, then choose Export Video Libary.

Choose to export your library to separate files per entry (this bit is the magic)

Choose yes to export thumbs and fanart

Choose yes to overwrite old files.

The export now begins.Β  Once the export has completed, you’re actually done and you never ever need to go into, “Import Video Library” again!

How does this work?Β  It works because beside every file in your network share or disc folder/directory, the export put’s some matching files beside your movie files indicating to Kodi that this is the fanart, cover image, actors, directors, IMDB rating etc etc that belongs to this movie.Β  When Kodi is newly set up, all you need to do is go through the add items to your library section above and Kodi automatically pulls in the local versions of the files you previously exported.Β  You won’t need to go off to the internet for those files again!

Caveats, Gotcha’s and a bit of tweaking

OK, so the library isn’t always perfect, the automatic download feature sometimes skips stuff (as I mentioned before).Β  For these ones, Kodi may still go off to the internet at some stage, or they may be missed off altogether.Β  That’s OK, we can fix that!

Movies that aren’t detected

You can easily see which files were not detected, because when you open your movies folder in your favourite file manager you will see which ones do not haveΒ  any .nfo .tbn files etc beside them.Β  (To do this make sure you’re viewing your files sorted by name).Β  It’s these one’s that you need to do a bit of manual tweaking, but once you’ve done it, you shouldn’t need to go back to them, and they should stay there accross new versions of Kodi.

The way Kodi uses it’s scrapers is based on a file filter using something called regex.Β  Don’t worry about that too much, but just understand that the name of each of your files is quite important so that Kodi knows what movie to look up.Β  As an example, if you have a movie with a ‘ in it’s name, it needs to go into the file.Β  For example, if you had the Movie, “My Moms New Boyfriend”, it needs to read, “My Mom’s New Boyfriend”.Β  This is because if you look it up on the internet (the same thing the Kodi scraper does) it is actually written on the internet this way and the apostrophe is counted as a character it needs to match.Β  After you’ve changed the name of your movie, right click or press C on any movie in the library and choose, “Update Library”.Β  It’ll most likely turn up.

If a movie is still not being detected, plug it into google and see what comes up.Β  If you can find it in imdb.com and it has the same name, there’s another trick you can do.

Copy the url from imdb.com (or another supported scraper site (which you can get a list of from that same settings screen we went to above) and paste it as the only line in a text file.Β  Put the text file beside the movie in question and call it EXACTLY the same name but with .nfo on the end (so it should look like shrek.nfo for example).Β  Then choose update libarary again.Β  Kodi should say, “Oh, for this movie I need to go and look at this web address”.Β  If it does find something and it works well, you should re-export your library exactly the same as we did before (above) and choose yes to overwrite your files.Β  Then you will never have to go back to this particular one again.

If it doesn’t work, keep looking for web sites.Β  If you still can’t get the scraper to work you can put it in manually.Β  Most of the time these ones will not have fanart, but you should still be able to get a DVD cover and info on the movie.

The first step is to download a DVD cover off the internet.Β  Just google for it, get the enlarged version if available and right click, save as and put it somewhere on your computer.Β  You then need to convert the file to a .tbn file.Β  To do this in linux you need imagemagick installed (also available for windows I believe).Β  Once installed, type, “convert yourcovername.jpg yourcovername.tbn.Β  Then copy that file beside the movie file in question and give it the same name but keeping the .tbn extension.Β  If you update your library you should see the dvd cover display appear.Β  Occasionally, I’ve had to remove and re-add the Video source to get this to work, but it’s no big deal since it doesn’t have to go off to the internet any more.Β  πŸ™‚

For the information that goes with the movie, copy one of the other movies .nfo files and edit it.Β  It’s pretty obvious what you need to change, just make sure it’s named yourmove.nfo, not the old movie name as you’ll stuff things up and need to remove and re-add your library again.

Welcome to your new Kodi library that installs in minutes instead of hours! πŸ™‚Β  Have fun!

Good luck!

Popular Articles

Raspberry Pi 3

Raspberry Pi Disk Images – Definitive List

2
This page attempts to list all the Raspberry Pi disk images known to currently exist from around the web, providing direct links to download...
Port Scan Test

How to check port forwarding is working

1
Problem-Outcome Summary This guide applies to:Any router or firewall you may have such as:DLink, Asus, TP Link, Linksys, Synology, Apple, Belkin, Buffalo, Cisco,...
Raspberry Pi Audio Hardware

Raspberry Pi audio HAT’s (Hardware Attached on Top) – Definitive List

0
Summary Back in July 2014, Raspberry Pi announced the then new, Raspberry Pi 2 followed soon after by the announcement of HaTs (Hardware Attached on...
How to set Plex permissions on Linux / NAS devices

How to set Plex permissions on linux or NAS devices

9
Problem / Outcome SummaryThis how to guide will show you how to properly set up Linux file permissions for Plex Media Server Please...
How To Install Logitech Media Server on Ubuntu Linux

How to install Logitech Media Server on Ubuntu Linux

0
Problem / Outcome SummaryThis how to guide will enable you to install Logitech Media Server on Ubuntu Linux For how to install Logitech...
spot_img

Related Stories

17 COMMENTS

  1. Thanks for the instructions. A couple of things that helped me:
    1. I had already tried to use the automatic library scan (which missed many things mainly due to my naming convention for media), so knowing that setting the content of the parent directory to “none” would remove the library stuff was useful.
    2. I used the export/import features from the settings/video options instead of the video directory.

  2. Hi, i am interested in making my own HTPC with XBMC and was wondering if XBMC Live is able to import my mp3s or video files from and external HD into the HTPC. I take it XBMC Live is able to connect to the net for scrapers? Thanks

  3. Hi, thanks for your question. XBMC fully supports MP3’s and almost every video format I’ve seen as long as it’s not encrypted (such as blu-rays). XBMC doesn’t really import files into the library, the library is really just for all the meta-info such as fan-art, artist info, descriptions and ratings. Yes, XBMC supports multiple scrapers for both music and video, have a look around this site and you’ll see quite a few articles and screenshots on how to do this and what they look like.

    As far as getting the info from an external disk this is also quite easy. You could either leave the disk plugged in as external and run everything off that, or copy the data from that disk onto the internal xbmc disk, your NAS/Windows machine or whatever. XBMC will happily connect direct to disk, USB disks, Network storage or similar over wired or wireless networks. You can see all this in the sources section of each individual media area (ie clicking on Video or Music).

    Hope that helps πŸ™‚

  4. Thanks for the reply. Believe it or not, i actually forgot that i posted a question. Work has its way of making sure your attention is directed elsewhere sometimes.
    Would also like to know, that with xbmc live, could i, say, connect my ext HD to my HTPC and Cut/Paste the files from the ext HD to my HTPC? I’m aware that XBMC Live runs on Ubuntu and was wondering if i could access the OS to do such.
    Once again, thank you so much for your reply

  5. No worries πŸ™‚ Actually there’s a file manager built right into XBMC that makes this possible yes. I just don’t remember where to access it πŸ˜‰ Or as you point out, you can access the OS, but because it’s been thinned down (creating less running services and improving performance) there is no traditional window manager included. This means you need to use console commands like cp or mv (like using DOS under windows). You could of course install a window manager from the ubuntu repositories, but I wouldn’t recommend it, it would be complex to set up and you may as well just go and get ubuntu and load xbmc onto that.

  6. Ah yeah, it took a while for this to click for me, things are often simpler than they initially seem! πŸ™‚ You’re most welcome.

  7. I found an alternative to this if it helps. Media Companion is a really handy program / exe to scan all your folders and create the tbn nfos of shows needed by XBMC. It’s been pretty reliable for me and catches all the items that XBMC misses.

    It’s free. Site here http://billyad2000.co.uk/

  8. Hi there, i’ve recently come across an issue with my library on xbmc. I had around 270 movies working fine, however recently added a further 120. The new movies were picked up within the scan however the movie names did not show up – the field where the name generally shows up is completely blank. The year, genre, rating and cast information has also not downloaded (I use imbd for infoormation). I have cleaned the file lists, removed and readded the movie source and even gone as far to uninstall the programme completely and install from scratch however this has not made any difference so now all my movies are not showing up with all the normal information. There hasn’t been any effect to my TV Shows though… Do you have any idea as to what may be causing this?

  9. If I export, then add new media files, would I then have to manually perform the export again for everything to be up to date? And if so, is there a way to automate this process? Thanks

  10. I love this guys optimism…. Very obviously “marshalleq” doesn’t live in a “Third World Country” like I do, and the highest internet speed is 10Mb/s but the cost is way more than the average “Joe” can afford, so you are stuck with a 1Mb/s line instead that still costs you an arm and a leg…. POINT of this being…. It takes more than “5 DAYS” to get all my movies, series, and music videos covers and artwork downloaded from the internet. So…. @ “marshalleq” Thank you (And I truly mean this) ever so much for the great tip, and advise, I will be giving it a whirl in a few days time because I have 3 x XBMC Live boxes running off of one NAS unit and needless to say, updating 3 pc’s with a 5-6 day update interval (And doing this one at a time because it can’t handle 2 x boxes updating at the same time) is not my idea of fun.

    If I may query, I am just not sure if I like the idea of the *.png and*.jpg (And other files) landing up on the drive with the content. (Not to be funny or critical or anything, but 3000+ movies spread over 3 x 2TB drives with all that extra info plastered inside of the drive might make finding the *.avi’s and *.mkv’s etc a bit hard to locate, as I am assuming this is how it would export the database in separated files.

    Thanx again for the info. πŸ™‚

  11. Hey, this is the first time I’ve logged into my blog for what feels like years, and what do you know there’s a comment to answer πŸ˜‰

    I live in NZ, our internet has been bad here for a long time but recently got better, still yes, the point is when you have a large library the updates take AGES be it hours or days. πŸ˜‰

    I haven’t found the file names in the directories too much of a problem as it only applied to when you’re viewing the files on a computer or have XBMC running in file mode (which I void’s the whole purpose of this post really). It’s not too hard to do a dir *.avi or ls *.avi on linux / mac. Or if you get fed up just do a del*.jpg etc. πŸ˜‰

    I chose the multiple file method because in testing I found the single file method did not work properly. Also the single file method does not work if you move any of your movies or set up via shares at different locations withing the directory structure.

    Another option with the latest XBMC is to centralise your database, but this has caveat’s and it would probably work best in conjuction with the above anyway.

  12. Hi guys,

    I was wondering if there is any way of importing titles only in the XBMC library directly from IMDB or other movie sites (I’m not referring to scrapping the titles I already have on the HDD).

    I mean import title only as I would like to update XBMC library with the movies I’ve seen on different occasions (either cinema, TV, XBMC, live stream from Netflix, etc) but I do not have them as local media (and I don’t want to download them but only to update the list of seen movies).

    I’m using the .nfo file scan described above for some time:

    1. I usually start with two empty files – one .mkv and one .nfo – having random names as it does’n matter exactly the name of the file – something like asdf.mkv and asdf.nfo

    2. copy/paste these files as long as I don’t get bored (usually for 10 – 20 times) – this result in 20 – 40 files named asdf copy (1).mkv, asdf copy (1).nfo, … asdf copy (20).mkv, asdf copy (20).nfo

    3. manually edit the .nfo for every title with the address from IMDB.

    4. update XBMC library

    5. delete all files described above

    However this is quite time consuming and for aprox. 3 to 4 thousand movie titles (apart from TV series) I would need a couple of days to do it.

    What I would need is (either an add-on for XBMC or a web site) that can open the IMDB site and only click on the titles seen and afterwards import on the local drive the files needed for updating XBMC library.

    Programming is not a solution as I can’t even code more half of line in VBA πŸ˜€

    Regards

  13. Hello,

    Have looked around but didnt get any clue.

    I had my library correctly updated using IMDB scrapper with movie porters and fanrt in XBMC Dharma 10.x. When i thought of upgrading to Pre-Aplha Frodo Alpha4, i wanted to make a new fresh clean installation. So i exported the library from Dharma using the “separate files per movie” option. This created the actor pics, thumbnail and fan-art file in the respective movie-named folders for each movie stored on my NAS.

    Now when i have installed Frodo and created the same sources to begin building the media library from the locally stored info (exported previously from Dharma in each movie folder) , it still takes a long time to get completed, to which I am not sure that whether it is picking the locally stored information or re-scraping the internet again. It does complete at last.

    Now surprisingly I can see the fanart for some movies in the library list view and for some other movies it is not being displayed (instead a plain white background is shown). I have double checked the fanart JPG file does actually exist for each movie in the respective folders and I can open it in any picture viewing program.

    I cannot understand why is it refusing to read the locally stored fanart for some movies. Even if I go to the movie information page from within the library view to choose the remote or locally stored fanart, the remote thumbnails are displayed correctly, however the locally stored thumbnail is shown just as a plain white thumbnail (however the JPG file outside of XBMC is actually correct and displays the correct picture).I have seen the same behaviour in Eden as well.

    Any ideas of what can be a remedy to the situation. Thanks for the information

  14. Hi all, I am totally new to linux full stop and have just installed XBMCubuntu 11.0 on a media centre. All looks great but…. how do I put things on to the hard drive.
    Ive plugged a usb pen into the machine with films on and the media centre will see and play them but i still dont know how to move files on to the actual media centre’s hard drive.
    The installation is fresh with no add-ons…

    Any help given will be appreciated.

Stay on op - Ge the daily news in your inbox