Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 64bc2c1ece402a3bf975c32d9e37c2a5 > files > 13

amarok-1.4.8-12mdv2008.1.src.rpm

--- amarok/src/collectiondb.cpp	2008/03/15 10:27:32	785863
+++ amarok/src/collectiondb.cpp	2008/03/15 10:52:54	785864
@@ -2157,7 +2157,7 @@
     if ( artist == i18n( "Various Artists" ) || artist.isEmpty() )
     {
          rs = query( QString(
-            "SELECT images.deviceid,images.path FROM images, artist, tags "
+            "SELECT distinct images.deviceid,images.path FROM images, artist, tags "
             "WHERE images.artist = artist.name "
             "AND artist.id = tags.artist "
             "AND tags.sampler = %1 "
@@ -2170,7 +2170,7 @@
     else
     {
         rs = query( QString(
-            "SELECT images.deviceid,images.path FROM images WHERE artist %1 AND album %2 AND deviceid IN (%3) ORDER BY path;" )
+            "SELECT distinct images.deviceid,images.path FROM images WHERE artist %1 AND album %2 AND deviceid IN (%3) ORDER BY path;" )
                     .arg( CollectionDB::likeCondition( artist ) )
                     .arg( CollectionDB::likeCondition( album ) )
                     .arg( deviceIds ) );