diff -r 2a40e88564c8 -r 13afc0e517bd mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplaylistsongs.cpp --- a/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplaylistsongs.cpp Tue Feb 02 00:09:33 2010 +0200 +++ b/mpxplugins/serviceplugins/collectionplugins/mpxsqlitedbhgplugin/src/mpxdbplaylistsongs.cpp Fri Feb 19 22:48:30 2010 +0200 @@ -120,7 +120,12 @@ TInt aDriveId) { MPX_FUNC("CMPXDbPlaylistSongs::AddSongL"); - return AddSongL(aPlaylistId, CountL(aPlaylistId), aMedia, aDriveId); + TInt count(0); + if (aDriveId >= 0) + { + count = CountL(aPlaylistId, aDriveId); + } + return AddSongL(aPlaylistId, count, aMedia, aDriveId); } // ---------------------------------------------------------------------------- @@ -631,10 +636,11 @@ // ---------------------------------------------------------------------------- // TInt CMPXDbPlaylistSongs::CountL( - TUint32 aPlaylistId) + TUint32 aPlaylistId, + TInt aDriveId) { MPX_FUNC("CMPXDbPlaylist::CountL"); - return ExecuteSumQueryL(KQueryPlaylistSongsCount, aPlaylistId); + return ExecuteSumExQueryL(KQueryPlaylistSongsCount, aPlaylistId, aDriveId); } // ----------------------------------------------------------------------------