Add sort tags to context view
This commit is contained in:
@@ -64,15 +64,21 @@ ContextSettingsPage::ContextSettingsPage(SettingsDialog *dialog, QWidget *parent
|
||||
// Create and populate the helper menus
|
||||
QMenu *menu = new QMenu(this);
|
||||
menu->addAction(ui_->action_title);
|
||||
menu->addAction(ui_->action_titlesort);
|
||||
menu->addAction(ui_->action_album);
|
||||
menu->addAction(ui_->action_albumsort);
|
||||
menu->addAction(ui_->action_artist);
|
||||
menu->addAction(ui_->action_artistsort);
|
||||
menu->addAction(ui_->action_albumartist);
|
||||
menu->addAction(ui_->action_albumartistsort);
|
||||
menu->addAction(ui_->action_track);
|
||||
menu->addAction(ui_->action_disc);
|
||||
menu->addAction(ui_->action_year);
|
||||
menu->addAction(ui_->action_originalyear);
|
||||
menu->addAction(ui_->action_composer);
|
||||
menu->addAction(ui_->action_composersort);
|
||||
menu->addAction(ui_->action_performer);
|
||||
menu->addAction(ui_->action_performersort);
|
||||
menu->addAction(ui_->action_grouping);
|
||||
menu->addAction(ui_->action_filename);
|
||||
menu->addAction(ui_->action_url);
|
||||
|
||||
@@ -486,6 +486,54 @@
|
||||
<string>Add song original year tag</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_artistsort">
|
||||
<property name="text">
|
||||
<string>%artistsort%</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add song artistsort tag</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_albumartistsort">
|
||||
<property name="text">
|
||||
<string>%albumartistsort%</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add song albumartistsort tag</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_titlesort">
|
||||
<property name="text">
|
||||
<string>%titlesort%</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add song titlesort tag</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_composersort">
|
||||
<property name="text">
|
||||
<string>%composersort%</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add song composersort tag</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_performersort">
|
||||
<property name="text">
|
||||
<string>%performersort%</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add song performersort tag</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_albumsort">
|
||||
<property name="text">
|
||||
<string>%albumsort%</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Add song albumsort tag</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -142,15 +142,27 @@ QString ReplaceVariable(const QString &variable, const Song &song, const QString
|
||||
if (variable == "%title%"_L1) {
|
||||
value = song.PrettyTitle();
|
||||
}
|
||||
else if (variable == "%titlesort%"_L1) {
|
||||
value = song.titlesort();
|
||||
}
|
||||
else if (variable == "%album%"_L1) {
|
||||
value = song.album();
|
||||
}
|
||||
else if (variable == "%albumsort%"_L1) {
|
||||
value = song.albumsort();
|
||||
}
|
||||
else if (variable == "%artist%"_L1) {
|
||||
value = song.artist();
|
||||
}
|
||||
else if (variable == "%artistsort%"_L1) {
|
||||
value = song.artistsort();
|
||||
}
|
||||
else if (variable == "%albumartist%"_L1) {
|
||||
value = song.effective_albumartist();
|
||||
}
|
||||
else if (variable == "%albumartistsort%"_L1) {
|
||||
value = song.albumartistsort();
|
||||
}
|
||||
else if (variable == "%track%"_L1) {
|
||||
value.setNum(song.track());
|
||||
}
|
||||
@@ -169,9 +181,15 @@ QString ReplaceVariable(const QString &variable, const Song &song, const QString
|
||||
else if (variable == "%composer%"_L1) {
|
||||
value = song.composer();
|
||||
}
|
||||
else if (variable == "%composersort%"_L1) {
|
||||
value = song.composersort();
|
||||
}
|
||||
else if (variable == "%performer%"_L1) {
|
||||
value = song.performer();
|
||||
}
|
||||
else if (variable == "%performersort%"_L1) {
|
||||
value = song.performersort();
|
||||
}
|
||||
else if (variable == "%grouping%"_L1) {
|
||||
value = song.grouping();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user