mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2024-12-14 01:26:00 +01:00
Formatting
This commit is contained in:
parent
f69e42e520
commit
434b31b932
@ -44,8 +44,7 @@ InternetSearchModel::InternetSearchModel(InternetService *service, QObject *pare
|
||||
proxy_(nullptr),
|
||||
use_pretty_covers_(true),
|
||||
artist_icon_(IconLoader::Load("folder-sound")),
|
||||
album_icon_(IconLoader::Load("cdcase"))
|
||||
{
|
||||
album_icon_(IconLoader::Load("cdcase")) {
|
||||
|
||||
group_by_[0] = CollectionModel::GroupBy_AlbumArtist;
|
||||
group_by_[1] = CollectionModel::GroupBy_AlbumDisc;
|
||||
@ -257,8 +256,11 @@ QStandardItem *InternetSearchModel::BuildContainers(const Song &s, QStandardItem
|
||||
|
||||
// Find a container for this level
|
||||
key->group_[level] = display_text + unique_tag;
|
||||
QStandardItem *container = containers_[*key];
|
||||
if (!container) {
|
||||
QStandardItem *container = nullptr;
|
||||
if (containers_.contains(*key)) {
|
||||
container = containers_[*key];
|
||||
}
|
||||
else {
|
||||
container = new QStandardItem(display_text);
|
||||
container->setData(sort_text, CollectionModel::Role_SortText);
|
||||
container->setData(group_by_[level], CollectionModel::Role_ContainerType);
|
||||
@ -408,4 +410,3 @@ MimeData *InternetSearchModel::LoadTracks(const InternetSearchView::ResultList &
|
||||
return mime_data;
|
||||
|
||||
}
|
||||
|
||||
|
@ -318,9 +318,9 @@ bool InternetSearchView::ResultsContextMenuEvent(QContextMenuEvent *e) {
|
||||
|
||||
if (!context_menu_) {
|
||||
context_menu_ = new QMenu(this);
|
||||
context_actions_ << context_menu_->addAction( IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, &InternetSearchView::AddSelectedToPlaylist);
|
||||
context_actions_ << context_menu_->addAction( IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, &InternetSearchView::LoadSelected);
|
||||
context_actions_ << context_menu_->addAction( IconLoader::Load("document-new"), tr("Open in new playlist"), this, &InternetSearchView::OpenSelectedInNewPlaylist);
|
||||
context_actions_ << context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Append to current playlist"), this, &InternetSearchView::AddSelectedToPlaylist);
|
||||
context_actions_ << context_menu_->addAction(IconLoader::Load("media-playback-start"), tr("Replace current playlist"), this, &InternetSearchView::LoadSelected);
|
||||
context_actions_ << context_menu_->addAction(IconLoader::Load("document-new"), tr("Open in new playlist"), this, &InternetSearchView::OpenSelectedInNewPlaylist);
|
||||
|
||||
context_menu_->addSeparator();
|
||||
context_actions_ << context_menu_->addAction(IconLoader::Load("go-next"), tr("Queue track"), this, &InternetSearchView::AddSelectedToPlaylistEnqueue);
|
||||
|
Loading…
Reference in New Issue
Block a user