extragear/multimedia/amarok/src/collection/sqlcollection

Jeff Mitchell mitchell at kde.org
Sun May 10 18:11:01 CEST 2009


SVN commit 966206 by mitchell:

Revert Max's r966005.  Max, tons of reports of tags correlating incorrectly with tracks and all sorts of general brokenness.  Can you take another look at this?

CCMAIL: amarok-devel at kde.org


 M  +8 -3      SqlQueryMaker.cpp  


--- trunk/extragear/multimedia/amarok/src/collection/sqlcollection/SqlQueryMaker.cpp #966205:966206
@@ -575,10 +575,15 @@
     if( !d->linkedTables )
         return;
 
+    if( d->linkedTables & Private::URLS_TAB )
+        d->queryFrom += " urls";
     if( d->linkedTables & Private::TAGS_TAB )
-        d->queryFrom += "tracks";
-    if( d->linkedTables & Private::URLS_TAB )
-        d->queryFrom += " INNER JOIN urls ON tracks.id = urls.id";
+    {
+        if( d->linkedTables & Private::URLS_TAB )
+            d->queryFrom += " LEFT JOIN tracks ON urls.id = tracks.url";
+        else
+            d->queryFrom += " tracks";
+    }
     if( d->linkedTables & Private::ARTIST_TAB )
         d->queryFrom += " LEFT JOIN artists ON tracks.artist = artists.id";
     if( d->linkedTables & Private::ALBUM_TAB )


More information about the Amarok-devel mailing list