feat: pagination, back/forward nav, context menu, artist fav, image fix

**Artist portrait**
- Fix CDN URL: images.portrait.{hash,format} →
  https://static.qobuz.com/images/artists/covers/large/{hash}.{format}

**Section alignment**
- Qt::ToolButtonTextOnly on all section toggles so text is truly left-aligned

**Auth 401 race condition**
- qobuz_backend_set_token now uses blocking_lock() instead of spawning an
  async task, guaranteeing the token is set before any subsequent API call

**Pagination (infinite scroll)**
- Release sections load 50 at a time (was 500)
- ArtistSection tracks has_more + loaded count; scrolling to the bottom
  emits loadMoreRequested → ArtistView calls getArtistReleases(offset=N)
- AlbumListView gains addAlbums() for append; setReleases routes to
  setAlbums (offset=0) or appendAlbums (offset>0)

**Back/Forward navigation**
- MainToolBar exposes Back/Forward QActions (go-previous/go-next icons)
- MainWindow keeps a NavPage vector + index; pushNav() on every album/artist
  navigation; goBack/goForward re-navigate without pushing history

**Context menu on now-playing label**
- Right-click on track label in toolbar → "Go to Album" / "Go to Artist"
- MainToolBar stores current track; emits albumRequested/artistRequested
  signals wired to MainWindow's existing handlers

**Artist favourites button**
- ♡ Favourite / ♥ Favourited toggle in artist header
- Calls new addFavArtist / removeFavArtist (Rust + Qt backend wiring)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joren
2026-03-25 18:25:12 +01:00
parent 963c9ad232
commit 3e96b6d7a8
157 changed files with 64124 additions and 84 deletions

View File

@@ -30,7 +30,7 @@ public:
void search(const QString &query, quint32 offset = 0, quint32 limit = 20);
void getAlbum(const QString &albumId);
void getArtist(qint64 artistId);
void getArtistReleases(qint64 artistId, const QString &releaseType, quint32 limit = 500, quint32 offset = 0);
void getArtistReleases(qint64 artistId, const QString &releaseType, quint32 limit = 50, quint32 offset = 0);
void getPlaylist(qint64 playlistId, quint32 offset = 0, quint32 limit = 500);
// --- favorites ---
@@ -55,6 +55,8 @@ public:
void removeFavTrack(qint64 trackId);
void addFavAlbum(const QString &albumId);
void removeFavAlbum(const QString &albumId);
void addFavArtist(qint64 artistId);
void removeFavArtist(qint64 artistId);
// --- playback ---
void playTrack(qint64 trackId, int formatId = 6);
@@ -85,7 +87,7 @@ signals:
void searchResult(const QJsonObject &result);
void albumLoaded(const QJsonObject &album);
void artistLoaded(const QJsonObject &artist);
void artistReleasesLoaded(const QString &releaseType, const QJsonArray &items);
void artistReleasesLoaded(const QString &releaseType, const QJsonArray &items, bool hasMore, int offset);
void playlistLoaded(const QJsonObject &playlist);
void playlistCreated(const QJsonObject &playlist);
void playlistDeleted(const QJsonObject &result);