Commit 6ce0e91e authored by Alexander Stippich's avatar Alexander Stippich

Fetch all metadata and fix metadata view

Summary:
Not all metadata was fetched from the database.
Also do not load database id for display in the
metadata view.

Test Plan:
Year is displayed in metadata view
No empty entry with bogus label

Reviewers: mgallien, ngraham

Reviewed By: ngraham

Tags: #elisa

Differential Revision: https://phabricator.kde.org/D23934
parent 821f4660
......@@ -6375,6 +6375,21 @@ DatabaseInterface::TrackDataType DatabaseInterface::buildTrackDataFromDatabaseRe
if (!trackRecord.value(18).isNull()) {
result[TrackDataType::key_type::LyricistRole] = trackRecord.value(18);
}
if (!trackRecord.value(19).isNull()) {
result[TrackDataType::key_type::CommentRole] = trackRecord.value(19);
}
if (!trackRecord.value(20).isNull()) {
result[TrackDataType::key_type::YearRole] = trackRecord.value(20);
}
if (!trackRecord.value(21).isNull()) {
result[TrackDataType::key_type::ChannelsRole] = trackRecord.value(21);
}
if (!trackRecord.value(22).isNull()) {
result[TrackDataType::key_type::BitRateRole] = trackRecord.value(22);
}
if (!trackRecord.value(23).isNull()) {
result[TrackDataType::key_type::SampleRateRole] = trackRecord.value(23);
}
result[TrackDataType::key_type::HasEmbeddedCover] = trackRecord.value(24);
result[TrackDataType::key_type::FileModificationTime] = trackRecord.value(8);
if (!trackRecord.value(26).isNull()) {
......
......@@ -333,8 +333,7 @@ void TrackMetadataModel::trackData(const TrackMetadataModel::TrackDataType &trac
DatabaseInterface::RatingRole, DatabaseInterface::GenreRole,
DatabaseInterface::LyricistRole, DatabaseInterface::ComposerRole,
DatabaseInterface::CommentRole, DatabaseInterface::YearRole,
DatabaseInterface::LastPlayDate, DatabaseInterface::PlayCounter,
DatabaseInterface::DatabaseIdRole});
DatabaseInterface::LastPlayDate, DatabaseInterface::PlayCounter});
fillDataFromTrackData(trackData, fieldsForTrack);
}
......
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