Commit f43cdf35 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

fix init of Baloo listener to ignore already known tracks

with this listener will send all its tracks and they will be marked as
valid and will be kept. No longer present tracks will be removed.
parent 7b270955
......@@ -89,21 +89,9 @@ void LocalBalooFileListing::databaseIsReady()
void LocalBalooFileListing::initialTracksList(QString musicSource, QList<MusicAudioTrack> initialList)
{
if (musicSource == d->mSourceName) {
d->mAllAlbums.clear();
d->mAllAlbumCover.clear();
qDebug() << "LocalBalooFileListing::initialTracksList" << initialList.count();
const auto &constInitialList = initialList;
for (const auto &oneTrack : constInitialList) {
d->mAllAlbums[oneTrack.albumName()].push_back(oneTrack);
d->mNewTracks.push_back(oneTrack);
d->mAllAlbumCover[oneTrack.albumName()] = oneTrack.albumCover();
}
qDebug() << "LocalBalooFileListing::initialTracksList" << d->mAllAlbums.count();
Q_UNUSED(initialList);
if (musicSource == d->mSourceName) {
refreshContent();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment