XBMC Music Library Import

Posted by {"display_name"=>"greg", "login"=>"greg", "email"=>"greg@udon.org", "url"=>""} on November 30, 2013 · 4 mins read

These are my notes on importing a large music library into XBMC.

There's a comprehensive review of music libraries in XBMC here and the process of adding music to the library here.

Music Scraping Setup

I ran into an issue scraping my library that took hours to resolve and finally found this post. In short, before you add music to your library, you must setup your scrapers via System > Settings >  Add-ons. Never try to change the scrapers via Music > Artists > Change scraper or Music > Albums > Change scraper or you will have problems scraping. When I did this I also encountered problems being able to export my music library.

If you're already in this situation, delete your MyMusic32.db, reboot and then setup the scrapers as described above.

You'll need a music scraper add-on before you start. There's a list of album scrapers and artist scrapers. I'm going to use the Universal Album and Universal Artist scraper. Other popular scrapers are allmusic the as well as MusicBrainz.

Enable Logging

One more thing to consider before you scan you your library is to enable logging if you're using the Universal Artist/Album Scraper. Scanning in the library will initiate a search for artwork and some artwork will not be found for various reasons discussed in a follow-on post. If you want a list of information that was not found, you'll have to enable logging.

On Linux, edit the file ~/.xbmc/userdata/advancedsettings.xml and insert the following line after the first line of the file (the one with <advancedsettings>):

<loglevel>1</loglevel>

When you've done this, you'll need to restart XBMC. The results of the artwork search will be written to the logfile ~/.xbmc/temp/xbmc.log.

iTunes Ratings & Play Count

And yet one more thing to consider is importing of your iTunes ratings and play count information. If you're using iTunes on windows, the iTSfv tool will do this for you. iTSfv has many features but you'll find a good description on using the tool for this purpose here.

The POPM id3 field of your mp3 files is used to store the rating as well as the playcount. This field, also called the Popularimeter, is described here and here.

I made the change to the email address field as described in the forum post above and shown in this screen shot. I also used Mp3Tag to confirm that the changes were made to my mp3's. You'll find the POPM field by right clicking on one of your MP3 files in Mp3tag and selecting Extended Tags.

While it's great that XBMC can import the mp3 standard POPM field, the ratings are not maintained in your mp3 files. Instead, I'm sure for performance reasons, the rating information is kept in the XBMC database in the song table.

Add Directory to the Library

Go to MusicFiles in XBMC, browse to a directory and use the context menu and Scan to Library. This will initiate the importing of your music and the scraping process.

Export Library

I like to export the library info to an XML file in so I have a browseable list of what's in the library and to help in addressing errors in the mp3 tags. You do the export under Settings > Music > Export

Delete and Restart

I ended up scratching and re-loading my library more than one time and I used this process on Linux.

- Stop XBMC
- Delete the files ~/.xmbc/userdata/Database/MyMusic*
- Restart XBMC