feat: add playlist browse/search discovery and follow controls
Some checks failed
Build for Windows / build-windows (push) Has been cancelled
Some checks failed
Build for Windows / build-windows (push) Has been cancelled
This commit is contained in:
@@ -21,6 +21,7 @@ enum NodeType {
|
||||
NodeFavArtists,
|
||||
NodePlaylist,
|
||||
NodeBrowseGenres,
|
||||
NodeBrowsePlaylists,
|
||||
};
|
||||
|
||||
Library::Library(QobuzBackend *backend, QWidget *parent)
|
||||
@@ -79,6 +80,9 @@ void Library::buildStaticNodes()
|
||||
|
||||
auto *genresItem = new QTreeWidgetItem(m_browseNode, QStringList{tr("Genres")});
|
||||
genresItem->setData(0, TypeRole, NodeBrowseGenres);
|
||||
|
||||
auto *playlistsItem = new QTreeWidgetItem(m_browseNode, QStringList{tr("Playlists")});
|
||||
playlistsItem->setData(0, TypeRole, NodeBrowsePlaylists);
|
||||
}
|
||||
|
||||
void Library::refresh()
|
||||
@@ -176,6 +180,7 @@ void Library::onItemClicked(QTreeWidgetItem *item, int)
|
||||
case NodeFavAlbums: emit favAlbumsRequested(); break;
|
||||
case NodeFavArtists: emit favArtistsRequested(); break;
|
||||
case NodeBrowseGenres: emit browseGenresRequested(); break;
|
||||
case NodeBrowsePlaylists: emit browsePlaylistsRequested(); break;
|
||||
case NodePlaylist: {
|
||||
const qint64 id = item->data(0, IdRole).toLongLong();
|
||||
const QString name = item->data(0, NameRole).toString();
|
||||
|
||||
Reference in New Issue
Block a user