mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
Added disc to the groupby interface. Replced groupby_performer to groupby_disc
This commit is contained in:
parent
e8fbff4382
commit
7516438c8b
@ -128,8 +128,10 @@ QStandardItem* GlobalSearchModel::BuildContainers(const Song& s,
|
||||
|
||||
case LibraryModel::GroupBy_Composer:
|
||||
display_text = s.composer();
|
||||
case LibraryModel::GroupBy_Performer:
|
||||
display_text = s.performer();
|
||||
// case LibraryModel::GroupBy_Performer:
|
||||
// display_text = s.performer();
|
||||
case LibraryModel::GroupBy_Disc:
|
||||
display_text = s.disc();
|
||||
case LibraryModel::GroupBy_Grouping:
|
||||
display_text = s.grouping();
|
||||
case LibraryModel::GroupBy_Genre:
|
||||
|
@ -78,7 +78,8 @@ GroupByDialog::GroupByDialog(QWidget* parent)
|
||||
p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Year, 7));
|
||||
p_->mapping_.insert(Mapping(LibraryModel::GroupBy_YearAlbum, 8));
|
||||
p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Bitrate, 9));
|
||||
p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Performer, 10));
|
||||
// p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Performer, 10));
|
||||
p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Disc, 10));
|
||||
p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Grouping, 11));
|
||||
|
||||
connect(ui_->button_box->button(QDialogButtonBox::Reset), SIGNAL(clicked()),
|
||||
|
@ -93,6 +93,11 @@
|
||||
<string>Bitrate</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disc</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
@ -154,6 +159,11 @@
|
||||
<string>Bitrate</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disc</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
@ -215,6 +225,11 @@
|
||||
<string>Bitrate</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disc</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -203,8 +203,11 @@ void LibraryModel::SongsDiscovered(const SongList& songs) {
|
||||
case GroupBy_Composer:
|
||||
key = song.composer();
|
||||
break;
|
||||
case GroupBy_Performer:
|
||||
key = song.performer();
|
||||
// case GroupBy_Performer:
|
||||
// key = song.performer();
|
||||
// break;
|
||||
case GroupBy_Disc:
|
||||
key = song.disc();
|
||||
break;
|
||||
case GroupBy_Grouping:
|
||||
key = song.grouping();
|
||||
@ -295,7 +298,8 @@ QString LibraryModel::DividerKey(GroupBy type, LibraryItem* item) const {
|
||||
case GroupBy_Album:
|
||||
case GroupBy_Artist:
|
||||
case GroupBy_Composer:
|
||||
case GroupBy_Performer:
|
||||
// case GroupBy_Performer:
|
||||
case GroupBy_Disc:
|
||||
case GroupBy_Grouping:
|
||||
case GroupBy_Genre:
|
||||
case GroupBy_AlbumArtist:
|
||||
@ -333,7 +337,8 @@ QString LibraryModel::DividerDisplayText(GroupBy type,
|
||||
case GroupBy_Album:
|
||||
case GroupBy_Artist:
|
||||
case GroupBy_Composer:
|
||||
case GroupBy_Performer:
|
||||
// case GroupBy_Performer:
|
||||
case GroupBy_Disc:
|
||||
case GroupBy_Grouping:
|
||||
case GroupBy_Genre:
|
||||
case GroupBy_AlbumArtist:
|
||||
@ -780,8 +785,11 @@ void LibraryModel::InitQuery(GroupBy type, LibraryQuery* q) {
|
||||
case GroupBy_Composer:
|
||||
q->SetColumnSpec("DISTINCT composer");
|
||||
break;
|
||||
case GroupBy_Performer:
|
||||
q->SetColumnSpec("DISTINCT performer");
|
||||
// case GroupBy_Performer:
|
||||
// q->SetColumnSpec("DISTINCT performer");
|
||||
// break;
|
||||
case GroupBy_Disc:
|
||||
q->SetColumnSpec("DISTINCT disc");
|
||||
break;
|
||||
case GroupBy_Grouping:
|
||||
q->SetColumnSpec("DISTINCT grouping");
|
||||
@ -838,8 +846,11 @@ void LibraryModel::FilterQuery(GroupBy type, LibraryItem* item,
|
||||
case GroupBy_Composer:
|
||||
q->AddWhere("composer", item->key);
|
||||
break;
|
||||
case GroupBy_Performer:
|
||||
q->AddWhere("performer", item->key);
|
||||
// case GroupBy_Performer:
|
||||
// q->AddWhere("performer", item->key);
|
||||
// break;
|
||||
case GroupBy_Disc:
|
||||
q->AddWhere("disc", item->key);
|
||||
break;
|
||||
case GroupBy_Grouping:
|
||||
q->AddWhere("grouping", item->key);
|
||||
@ -915,7 +926,8 @@ LibraryItem* LibraryModel::ItemFromQuery(GroupBy type, bool signal,
|
||||
break;
|
||||
|
||||
case GroupBy_Composer:
|
||||
case GroupBy_Performer:
|
||||
// case GroupBy_Performer:
|
||||
case GroupBy_Disc:
|
||||
case GroupBy_Grouping:
|
||||
case GroupBy_Genre:
|
||||
case GroupBy_Album:
|
||||
@ -979,8 +991,10 @@ LibraryItem* LibraryModel::ItemFromSong(GroupBy type, bool signal,
|
||||
|
||||
case GroupBy_Composer:
|
||||
item->key = s.composer();
|
||||
case GroupBy_Performer:
|
||||
item->key = s.performer();
|
||||
// case GroupBy_Performer:
|
||||
// item->key = s.performer();
|
||||
case GroupBy_Disc:
|
||||
item->key = s.disc();
|
||||
case GroupBy_Grouping:
|
||||
item->key = s.grouping();
|
||||
case GroupBy_Genre:
|
||||
|
@ -81,7 +81,8 @@ class LibraryModel : public SimpleTreeModel<LibraryItem> {
|
||||
GroupBy_Genre = 6,
|
||||
GroupBy_AlbumArtist = 7,
|
||||
GroupBy_FileType = 8,
|
||||
GroupBy_Performer = 9,
|
||||
// GroupBy_Performer = 9,
|
||||
GroupBy_Disc = 9,
|
||||
GroupBy_Grouping = 10,
|
||||
GroupBy_Bitrate = 11,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user