extragear/multimedia/amarok/src/collection/sqlcollection
Maximilian Kossick
maximilian.kossick at googlemail.com
Sun May 10 12:43:57 CEST 2009
SVN commit 966005 by mkossick:
Fixed incorrect count of tracks in collection.
urls contains rows for tracks that are not in the collection anymore too, so do not left join on that table.
CCMAIL: amarok-devel at kde.org
M +3 -8 SqlQueryMaker.cpp
--- trunk/extragear/multimedia/amarok/src/collection/sqlcollection/SqlQueryMaker.cpp #966004:966005
@@ -575,15 +575,10 @@
if( !d->linkedTables )
return;
- if( d->linkedTables & Private::URLS_TAB )
- d->queryFrom += " urls";
if( d->linkedTables & Private::TAGS_TAB )
- {
- if( d->linkedTables & Private::URLS_TAB )
- d->queryFrom += " LEFT JOIN tracks ON urls.id = tracks.url";
- else
- d->queryFrom += " tracks";
- }
+ d->queryFrom += "tracks";
+ if( d->linkedTables & Private::URLS_TAB )
+ d->queryFrom += " INNER JOIN urls ON tracks.id = urls.id";
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