The Dharma Guide: Set up the sources

From Official Kodi Wiki
Jump to navigation Jump to search

This is where XBMC looks for your media-files. The Sources will determine the content of your library, they are necessary in order for XBMC to index your Video -Files into the proper libraries. Be aware that you always should name your video- and music-sources according to XBMC’s set. This will make sure that you have the best possible experience with the XBMC. Let’s get started.

Organization of your media files

Before we are adding your files to your XBMC-Sources you should make sure that the files are named properly. Ideally you have your movie-files all in one folder. It does not matter if there are subfolders and/or single files in this directory. The best way however is to use subfolders for each movie you have. The folder should then be named like the following Layout: “Movie Name (Release-Year)”. The part "Release Year" is technically not necessary but it will make sure that XBMC scrapes the right movie and you have the right movie in your library. See the following table for "best practices" for your media-files (entries inside [] are to be replaced by the respective values):

Sourcetype Folder-Structure mediafile-name
Movies MoviesMovie-Name (Release-Year) moviename (Release-Year).FileExtension
TVShows TVShowsTVShow-Name (Release-Year) ⇒ (optional) Season [SeasonNumber] tvshowname.S[SeasonNumber]E[EpisodeNumber].FileExtension

If you currently have not sorted your movie-directory, you can do this with the help of some additional tools which are available. Some of these tools also apply to TV Shows and can you help sort them out too. Note however that Sickbeard (which will be handled later in this Guide) will sort your TV-Shows in the best possible way and also names your files according to the mentioned best practices.



Mac OS X

These tools also will generate usable NFO-Files for the XBMC. NFO-Files are little text-files in which all information about the movie is stored in a XML-Layout. If XBMC finds a NFO-File inside a subfolder, it will use the information from this NFO rather than downloading the information from the internet. For some more information on NFO-Files head down, you’ll find a section dedicated to them. A neat function of the XBMC provides the possibility to play two video-files as if they are merged to one file. This is helpful for movies which contain multiple CDs. If you have the movie "The Matrix" for example split into two files, you should name those files like "The Matrix.CD1.FileExtension" and "The Matrix.CD2.FileExtension" (this will be done by the media managers mentioned above as well). When scraping this movie to the library, XBMC will know that this is supposed to be one movie and will index the both files only as one movie in your library. If you then play this movie via the library in your XBMC both files will be played – the CD2 after CD1 ends obviously. You won’t even notice the cut between those (unless the files have an overlay of course) two. Back to the XBMC. To start adding a source for movies hit the "Videos" button in the home - You will see a list of your CD-Drives and removable media-devices which are connected right now. You will also find a Button "Add Source" – hit it in order to bring up the Source-Menu.

You will find a screenshot below, how that should look like:

Dharma Guide 02.png

Hit the "Browse"-Button and locate your movie-location. Click "OK" and move to the Content-Screen.

It will look like this:

Dharma Guide 03.png

If you want to add your movies right now (you want to ;-)) hit the selection "Run automated scan". If you use subfolders in your main movie-folder you should set "Use folder names for lookups" and "Scan recursively" too. Hit "Ok" – XBMC will now search for your stored movies with the Movie- Scraper and adds the contents to your library. This will take a while.

TV shows

Editor note: This section is originally directed at users of the program sickbeard Before adding TV-Shows to XBMC you should complete the Sickbeard-Tutorial first. Click here to read it now. Come back when Sickbeard is fully configured. Open up Sickbeard in your Browser and click on the button "Manage". A list of all your TV-Shows should be presented to you – click on the empty field beneath "Rename". This should mark all the "Rename"-Fields of the shows. Now click on "submit" below. Use it in order to change your entire TV-Show-Collection to the right naming convention for XBMC. Also – It will help you to actually sort your Collection and to make it more accessible. With TV-Shows you also have the option to use locally stored NFO-Files for XBMC. In this case XBMC will also use the provided information in the NFO-Files to check for your TV Shows. This will make sure that you do not have problems with the scanning. Check the option in the sickbeard- config if you want the Files to be created. Be aware that you should apply the naming-convention "TV-Show-Name (Starting-Year)" to the subfolders holding your TV-Shows. This will make sure that you do not get the wrong information.

Now head back to the XBMC and hit the "Add Source"-Button. Select your TV-Show-Directory and click OK. In the "Content"-Screen you should then select "TV Shows". Mark the option "Run automated scan" if you want to. XBMC will now scrape all your Shows to your library.

Editor note: Sickbeard section of The Dharma Guide not currently included on the XBMC Wiki

Advanced library configuration

Using advanced "nfo"-files

As mentioned in the steps above NFO-files can be used by the XBMC to correctly read the information about your files instead of relying on online-data. But you can do more with those NFO- Files then simply replacing the online-stored information. An example is grouping movies into a set. For example:

  • Die Hard
  • Die Hard 2
  • Die Hard With a Vengeance
  • Live Free or Die Hard

These films are all part of the "Die Hard"-Quadology, however because "Live Free or Die Hard" begins with an "L" rather than a "D" it is ordered elsewhere and not nearby all the other "Die Hard"-Movies. You can add information to your NFO-File of the movie to correct this issue:

<title>Live Free or Die Hard</title> <--- (Title of the movie) --->
<set>Die Hard Collection</set> <--- (Set name to which it belongs) --->
<sorttitle>Die Hard 4</sorttitle> <--- (Title within the set) --->

Repeat these steps for the other Die Hard films, re-scrape and they should display as one movie set in your library. There is also a handy addon which will write those XML-Files for you. You can find the addon in the usual repo (see the AddOn-Section of this guide for information on AddOns and how to install them).

NFO-Files can influence many aspects of XBMC’s library. For more information visit the XBMC-Wiki: Import - Export Library#Video nfo Files containing XML data

Automatic cleaning of the library

If you delete a lot of movies/TV Shows after you have watched them, you will notice that the XBMC will not clean these files if you launch the Library-Update. You can erase those movies only if you pick the "Clean Library"-Function in the settings-menu. Another solution however would be to put a file "advancedsettings.xml" into your XBMC-Userdata-Folder. For Windows just hit "Windows-Key" + "R" and type in "%AppData%/XBMC/userdata". Create a new text-file with the following content inside this directory:


Rename the file to "advancedsettings.xml" and restart your XBMC. Your XBMC will now clean your video-library every time it updates it.

You can do a lot more with the "advancedsettings.xml" – for more information check the XBMC-Wiki: advancedsettings.xml