I was very excited to see that the OpenELEC team had released version 4.0, based on XBMC Gotham. I read a lot before attempting an upgrade, and I still had huge problems with the upgrade from OpenELEC 3.2.
First off, understand that I primarily use XBMC/OpenELEC for music. I’ve got about 40,000 tracks, and I’m pretty meticulous about curating them, getting their artist names consistent, standarding the genre names, etc. Let’s just say I’ve put a lot of time into maintaining my library, and I don’t want to lose it.
I first made a full backup of my userdata directory using the System and XBMC backup tools in OpenELEC, so I knew I had all my databases intact if I needed them.
I followed the advice to export my library before upgrading, and then importing it after the upgrade. It took me a few tries to realize that I first had to add the external USB drive where my music is stored and scan it before importing the library, or it would ignore all the tracks that are in the database export file.
So I finally got all my songs in there, but upon closer inspection, I found that I had lost all this cataloging work that I had done. Genres were all over the place. It was as if my database had rolled back 6 months.
So here’s what I did to fix the problem:
- Deleted MyMusic46.db
- Left MyMusic32.db in place
- Copied the upgrade files back into the Upgrade file share
- Let the system rebuild the MyMusic46.db file
Now my library looked normal, but whenever I went to the Music Library screen, I got an annoying message “Music library needs to rescan tags from files yes/no”. I was afraid to scan again, which might have broken my library. So here’s what I did:
- Made a backup copy of MyMusic46.db
- Agreed to the scan
- Rebooted right after starting the scan
- Compared md5sum on MyMusic46.db and MyMusic46.db.bak — they were different
- Replaced MyMusic46.db with MyMusic46.db.bak
Now my library looks great, and I don’t get the annoying prompt. I feel like I’m just executing voodoo spells here, as I’ve picked up bits and pieces of techniques from forums, but I don’t have a solid understanding of what is happening.
Gotham seems to be able to do a clean conversion from Frodo database, but all the guidance from “insiders” seems to point in the direction of avoiding this kind of database upgrade at all costs, and instead doing an export/clean install/import. But that didn’t work for me at all.
It’s also possible that I had a stale copy of MyMusic46.db sitting on disk when I started the upgrade. I’ve been doing development work on my own add-on, so I may have already created one. That could explain the effective time warp I saw in my music database. But I don’t really think I had that on my home OpenELEC system. My dev workstation, maybe, but not our home system.
I’m also not very confident in the export XML. It doesn’t seem like all my songs are in there. This whole process has been an ugly experience. I hope that I don’t find more problems in a week or two, when it will be harder to correct.
Bottom line advice: perform a full backup of your library databases before doing anything. You can almost certainly undo any damage if you’ve got those files. Even if you have to revert to Frodo.