feat: album list, artist list, and artist detail views

- Fav albums: now shows a sortable list (title/artist/year/tracks);
  double-click opens the album
- Fav artists: now shows a sortable list; double-click opens the artist
- Artist detail page: name, biography summary, and their album list
- Rust ArtistDto gains albums field; get_artist fixed to extra=albums only
- Volume popup minimum width set so "100%" label is never clipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joren
2026-03-24 00:59:02 +01:00
parent 2436b53697
commit d5dedacc36
11 changed files with 255 additions and 16 deletions

View File

@@ -19,12 +19,22 @@ MainContent::MainContent(QobuzBackend *backend, PlayQueue *queue, QWidget *paren
this);
m_welcome->setAlignment(Qt::AlignCenter);
m_tracks = new List::Tracks(m_backend, queue, this);
m_tracks = new List::Tracks(m_backend, queue, this);
m_albumList = new AlbumListView(this);
m_artistList = new ArtistListView(this);
m_artistView = new ArtistView(this);
m_stack->addWidget(m_welcome); // 0
m_stack->addWidget(m_tracks); // 1
m_stack->addWidget(m_welcome); // 0
m_stack->addWidget(m_tracks); // 1
m_stack->addWidget(m_albumList); // 2
m_stack->addWidget(m_artistList); // 3
m_stack->addWidget(m_artistView); // 4
m_stack->setCurrentIndex(0);
connect(m_albumList, &AlbumListView::albumSelected, this, &MainContent::albumRequested);
connect(m_artistList, &ArtistListView::artistSelected, this, &MainContent::artistRequested);
connect(m_artistView, &ArtistView::albumSelected, this, &MainContent::albumRequested);
}
void MainContent::showWelcome() { m_stack->setCurrentIndex(0); }
@@ -52,3 +62,21 @@ void MainContent::showSearchTracks(const QJsonArray &tracks)
m_tracks->loadSearchTracks(tracks);
m_stack->setCurrentIndex(1);
}
void MainContent::showFavAlbums(const QJsonObject &result)
{
m_albumList->setAlbums(result["items"].toArray());
m_stack->setCurrentIndex(2);
}
void MainContent::showFavArtists(const QJsonObject &result)
{
m_artistList->setArtists(result["items"].toArray());
m_stack->setCurrentIndex(3);
}
void MainContent::showArtist(const QJsonObject &artist)
{
m_artistView->setArtist(artist);
m_stack->setCurrentIndex(4);
}