Comment 4 for bug 1277045

Revision history for this message
Max Linke (max-linke) wrote :

HI Daniel

I looked into the db file that you uploaded. Your crates are basically still saved in there. But you have only ~7000 tracks saved in the track_locations table while the library table contains ~50000 entries. The mismatch between track_locations and library table already exists in the text dump of the sql database. So the database still knows about your tracks and crates it just forgot where most of them are saved.

What might work is to invalidate all your library hashes and then rescan your whole library.

"UPDATE LibraryHashes SET hash = 0;"

This will add all the tracks again with a track location. What you have to do now is connecting the track locations to the old library.ids'. We usually do this in 'TrackDAO::detectMovedFiles' but this function uses the filename (stored in the track_locations table) and track duration, so it won't work directly for you. But it should be possible to change the algorithm we use to take 'artist', 'title', 'album' and 'duration' from the library table only. If you have problems writing the sql code please tell us.

best Max