Commit 710275fd authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

properly enqueue files from file browser to playlist

BUG: 429465
parent da6e9781
......@@ -128,8 +128,27 @@ void FileBrowserProxyModel::enqueue(const DataTypes::MusicDataType &newEntry,
mPendingEntries = {};
mAllData.clear();
mPendingEntries.emplace(newEntry[DataTypes::ResourceRole].toUrl(),
newEntry.elementType() == ElisaUtils::Container);
switch (newEntry.elementType())
{
case ElisaUtils::Container:
mPendingEntries.emplace(newEntry[DataTypes::FilePathRole].toUrl(),
newEntry.elementType() == ElisaUtils::Container);
break;
case ElisaUtils::FileName:
mPendingEntries.emplace(newEntry[DataTypes::ResourceRole].toUrl(),
newEntry.elementType() == ElisaUtils::Container);
break;
case ElisaUtils::Album:
case ElisaUtils::Artist:
case ElisaUtils::Composer:
case ElisaUtils::Genre:
case ElisaUtils::Lyricist:
case ElisaUtils::Radio:
case ElisaUtils::Track:
case ElisaUtils::Unknown:
break;
}
mEnqueueInProgress = true;
mEnqueueMode = enqueueMode;
......
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