Commit 0521242f authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

fix enqueue of single music files

parent d3c37ff4
......@@ -131,6 +131,19 @@ QVariant FileBrowserModel::data(const QModelIndex &index, int role) const
result = (item.isDir() ? ElisaUtils::Container : ElisaUtils::FileName);
break;
}
case DataTypes::ColumnsRoles::FullDataRole:
{
KFileItem item = itemForIndex(index);
if (item.isDir()) {
} else {
if (item.currentMimeType().inherits(QStringLiteral("audio/x-mpegurl"))) {
} else {
result = QVariant::fromValue(DataTypes::MusicDataType{{DataTypes::ColumnsRoles::ResourceRole, item.url()},
{DataTypes::ColumnsRoles::ElementTypeRole, ElisaUtils::Track}});
}
}
break;
}
default:
result = KDirModel::data(index,role);
}
......
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