Changed paths in music database and broke Kodi
#1
I'm afraid I did a stupid.

I wanted to use NFS mounts directly in the OS instead of using libnfs.  I did an export and import for my video collection but couldn't for my music (All information is from tags and I didn't want to rescan and lose the last played information etc.).

I am using LibreElec 9.0.1 (Kodi 18.1) with the sqlite databases.

I shutdown the Pi and plugged the SD card into my computer and copied over the MyMusic##.db file to manipulate it.  (I also created a backup copy of the file at this point).
I used sqlite3 to update the "path" table with the new paths (update and replaced "nfs://#.#.#.#/path" with "/media/path").
I copied the modified MyMusic##.db file back to the SD card, plugged it back to the Pi, and started it.
Kodi never got past the splash screen (top reported that kodi.bin was busy doing... something).

I shut the Pi down, plugged the SD card back into my computer, and copied the backup MyMusic##.db file to it.
No Kodi starts just fine, but the Music section says that I have no music.  When I attempt to edit Music sources, Kodi restarts.  Help!
Reply
#2
(2019-05-14, 17:14)Genghis_Prawn Wrote: All information is from tags and I didn't want to rescan and lose the last played information etc.).
You can export that information using v18.2 https://kodi.wiki/view/Import-export_lib...ingle_File

A Debug Log might help reveal the problem.

Moved to Music.
My Signature
Links to : Forum rules (wiki) | Banned_Add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create_Music_Library (wiki) | HOW-TO:Create_Video_Library (wiki) || Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
Not stupid, just probably a little out of date with what the music library can do (and made some data editing error).
(2019-05-14, 17:14)Genghis_Prawn Wrote: I wanted to use NFS mounts directly in the OS instead of using libnfs.  I did an export and import for my video collection but couldn't for my music (All information is from tags and I didn't want to rescan and lose the last played information etc.).
With v18.2 you can now export/import the music playback history and ratings values of songs.

Since you have a backup copy of your original MyMusic72.db I suggest that you put that back, update to v18.2 (I think that is available now with LE but if not soon will be), export the song data. Then rather than any manual db edits, simply remove the source, clean the library, mount the music source via NFS and scan the tags, then import the song history. Importing matches on album, artist and song title (or mbids) so it will find the music in the new location and allocate dht eplaycount, lastplayed and any ratings.
Reply
#4
Yes, the upgrade to LibreElec which contained Kodi 18.2 just came out on May 10th, so your method worked perfectly.  It turned out that somehow, in the process of copying the database file to the SD card, it had become corrupted (Not a database).  I will copy everything over using SSH from now on.
Thanks everyone for your help!
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Changed paths in music database and broke Kodi00