Skip to content

Commit

Permalink
Export star rating and remove parenthesis from exported play count
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed May 21, 2022
1 parent 24b28ce commit eb3bc98
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/library/basetracktablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,16 @@ QVariant BaseTrackTableModel::roleValue(
}
switch (role) {
case Qt::ToolTipRole:
switch (field) {
case ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW:
case ColumnCache::COLUMN_LIBRARYTABLE_RATING:
case ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED:
return QVariant();
default:
// Same value as for kDataExportRole: (see below)
break;
}
M_FALLTHROUGH_INTENDED;
case kDataExportRole:
switch (field) {
case ColumnCache::COLUMN_LIBRARYTABLE_COLOR:
Expand All @@ -553,6 +563,9 @@ QVariant BaseTrackTableModel::roleValue(
return composeCoverArtToolTipHtml(index);
case ColumnCache::COLUMN_LIBRARYTABLE_PREVIEW:
return QVariant();
case ColumnCache::COLUMN_LIBRARYTABLE_RATING:
case ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED:
return rawValue;
default:
// Same value as for Qt::DisplayRole (see below)
break;
Expand Down

0 comments on commit eb3bc98

Please sign in to comment.