Music disappeared from library and can't rescan!
I recently moved my xbmc database to MySQL, following the guide on the XBMC wiki. I exported my music library to split files, then removed the sources and once I'd configured my advancedsettings.xml to use mysql as a backend, I rescanned, using a SMB share. XBMC picked up the info from the .nfo files that were stored there from the db export. Fine.

Then I deleted these nfo files, since the data was already in my MySQL db and they were dirtying my music collection. Sometime thereafter, I did a "Clean Audio Library" and my entire music library disappeared. I could still access my music through "Music > Files", but nothing was indexed by Artist / Album / etc. Funnily enough, all of the data was still there in the mymusic32 database in mysql.

I tried removing the source and re-adding it a number of times and a number of ways until I just gave up and dropped the mymusic32 database, restarted xbmc and started scanning my music database again. From a mysql console I could monitor data being added to the mymusic32 database - the "song" table was filling up.

However, nothing was showing up in the xbmc music library. I decided to do a test - add a music source for a small music directory, complete a full scan, and see if the library is populated. The scan completed successfully, but still, NOTHING. The library is empty; all I see on the main screen is this:


What can I do to rescan my music and regenerate a library?

How the hell did this happen in the first place?!
Start by looking in your debug log (wiki) after running a scan to see where the problem may lie.
I am having the EXACT same thing with all of my libraries as well (TV, Movies and Music). MySQL DB is there and updating the library also updates the DB (confirmed by deleting the DB and rescanning), but nothing shows in the Library unless I remove the advancedsettings.xml (reverting to SQLite).

I've tried everything I can think of (short of wiping all of my clients and re-installing everything) and I got nowhere...

Hopefully, there's a common solution to our problems.

My logs are here, here, here and here. The logs are of me trying different things.

Details can be found in my thread here.
Here's my log. Started up XBMC, scanned my music (it's already in mysql but the library is nonexistant), closed XBMC.

I find the following lines interesting:

09:50:54 T:5716   ERROR: CDatabase::GetSingleValue - failed on query 'SELECT count(distinct strAlbum) FROM songview LIMIT 1'
09:50:54 T:5716   ERROR: SQL: The table does not exist
                                            Query: SELECT count(distinct strArtists) FROM songview LIMIT 1
09:50:54 T:5716   ERROR: CDatabase::GetSingleValue - failed on query 'SELECT count(distinct strArtists) FROM songview LIMIT 1'

The songview table indeed does not exist:

mysql> show tables;
| Tables_in_mymusic32 |
| album               |
| album_artist        |
| album_genre         |
| albuminfo           |
| albuminfosong       |
| artist              |
| artistinfo          |
| content             |
| discography         |
| genre               |
| karaokedata         |
| path                |
| song                |
| song_artist         |
| song_genre          |
| version             |
16 rows in set (0.00 sec)

However, I dropped my 'mymusic32' database and restarted XBMC, so surely it should have created all necessary tables?

This looks like a relevant thread.

davor's suggestion (on the second page) of doing a
SET GLOBAL log_bin_trust_function_creators=1;
before xbmc creates the music database didn't work for me.

Nor did darwin's suggestion of creating the view by hand with

create view songview as select song.idSong as idSong, song.strExtraArtists as strExtraArtists, song.strExtraGenres as strExtraGenres, strTitle, iTrack, iDuration, song.iYear as iYear, dwFileNameCRC, strFileName, strMusicBrainzTrackID, strMusicBrainzArtistID, strMusicBrainzAlbumID, strMusicBrainzAlbumArtistID, strMusicBrainzTRMID, iTimesPlayed, iStartOffset, iEndOffset, lastplayed, rating, comment, song.idAlbum as idAlbum, strAlbum, strPath, song.idArtist as idArtist, strArtist, song.idGenre as idGenre, strGenre, strThumb, iKaraNumber, iKaraDelay, strKaraEncoding from song join album on song.idAlbum=album.idAlbum join path on song.idPath=path.idPath join  artist on song.idArtist=artist.idArtist join genre on song.idGenre=genre.idGenre join thumb on song.idThumb=thumb.idThumb left outer join karaokedata on song.idSong=karaokedata.idSong;

This didn't work for me since I don't have a "thumb" table.
Solved the problem by dumping my myvideos75 database, uninstalling mysql, installing mysql 5.5 (NOT 5.6), loading myvideos75 database and then doing a scan of my music.
Dang! You had the MySQL 5.6 issue. This is a known bug with the music DB and MySQL 5.6.

I currently am running 5.5.30 and still having this issue.
Sorry to hear that. Make sure you've only got 5.5 installed and that XBMC is connecting to a 5.5 daemon.. apart from that, I've no idea what to suggest. This one really got my blood boiling; I hope you find a solution soon.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Music disappeared from library and can't rescan!00
This forum uses Lukasz Tkacz MyBB addons.