Version: SVN-26.11.2006 (using KDE KDE 3.5.5) Installed from: Gentoo Packages hi, after updating amarok today I get following entries in my amarokrc: [Collection Folders] -1=./mnt/extHDD1/Music,./mnt/DATA/Public/Musik 1=./mnt/extHDD1/Music 3=./Public/Musik 1,3 are correct, those are the deviceids I got before too. but -1 is new and so all my statistics aren't touched any more, because the new deviceid is -1 and the statistics use 1 and 3. I tried to set all my statistics table to -1, but that gave an sql uniqueness error. btw, I needed to select my collection folders again after the update, because they weren't selected any more. thx, dominik
SVN commit 608062 by mkossick: drop complete tables when clearing tables. Fixes a problem where the statistics rows are not updated when deviceid/url when the deviceid/url for a song changed. This code was only necessary for CDs/DVDs anyway. CCBUG: 137916 M +13 -20 collectiondb.cpp --- trunk/extragear/multimedia/amarok/src/collectiondb.cpp #608061:608062 @@ -763,29 +763,22 @@ CollectionDB::clearTables( const bool temporary ) { QString clearCommand = "DELETE FROM"; - //if ( getDbConnectionType() == DbConnection::mysql || getDbConnectionType() == DbConnection::postgresql) - //{ - // TRUNCATE TABLE is faster than DELETE FROM TABLE, so use it when supported. - // clearCommand = "TRUNCATE TABLE"; - //} - IdList list = MountPointManager::instance()->getMountedDeviceIds(); - QString deviceIds = ""; - foreachType( IdList, list ) + if ( getDbConnectionType() == DbConnection::mysql || getDbConnectionType() == DbConnection::postgresql) { - if ( it != list.begin() ) deviceIds += ','; - deviceIds += QString::number(*it); + // TRUNCATE TABLE is faster than DELETE FROM TABLE, so use it when supported. + clearCommand = "TRUNCATE TABLE"; } - query( QString( "%1 tags%2 WHERE deviceid IN (%3);" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ).arg( deviceIds ) ); - //query( QString( "%1 album%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); - //query( QString( "%1 artist%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); - //query( QString( "%1 composer%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); - //query( QString( "%1 genre%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); - //query( QString( "%1 year%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); - query( QString( "%1 images%2 WHERE deviceid IN (%3);" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ).arg( deviceIds ) ); - query( QString( "%1 embed%2 WHERE deviceid IN (%3);" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ).arg( deviceIds ) ); - query( QString( "%1 directories%2 WHERE deviceid IN (%3);" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ).arg( deviceIds ) ); - query( QString( "%1 uniqueid%2 WHERE deviceid IN (%3);" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ).arg( deviceIds ) ); + query( QString( "%1 tags%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 album%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 artist%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 composer%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 genre%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 year%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 images%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 embed%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 directories%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); + query( QString( "%1 uniqueid%2;" ).arg( clearCommand ).arg( temporary ? "_temp" : "" ) ); if ( !temporary ) { query( QString( "%1 related_artists;" ).arg( clearCommand ) );
It looks like your KDE mediamanager is not working correctly. Therefore Amarok uses the deviceid -1. SVN revision 608062 fixes the problem that your statistics are not updated with the new deviceid/url of your songs.
mediamanager may be stopped by k3b -- see bug 134153