feat: artist/page endpoint, multi-disc fix, playlist ownership, UX improvements
- Switch artist view to artist/page API (proper sections: Albums, Singles & EPs, Live, Compilations; version in titles like "Deluxe") - Fix artist sections categorization using releases[].type from artist/page - Add getUser() backend call; fetch on session restore when userId=0 to fix playlist ownership (Remove from playlist / Delete playlist were missing) - Fix multi-disc double-click / Play Now queue start index (disc headers were counted in row index but excluded from currentTracksJson) - Hide redundant Album column when viewing an album - Make artist name in context header clickable (navigates to artist page) - Fix gap between title and artist name in context header (addStretch) - Fix queue panel track titles to include version field - Fix album list to show version in title column Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -72,6 +72,13 @@ MainWindow::MainWindow(QobuzBackend *backend, QWidget *parent)
|
||||
// ---- Backend signals ----
|
||||
connect(m_backend, &QobuzBackend::loginSuccess, this, &MainWindow::onLoginSuccess);
|
||||
connect(m_backend, &QobuzBackend::loginError, this, &MainWindow::onLoginError);
|
||||
connect(m_backend, &QobuzBackend::userLoaded, this, [this](const QJsonObject &user) {
|
||||
const qint64 id = static_cast<qint64>(user["id"].toDouble());
|
||||
if (id > 0) {
|
||||
AppSettings::instance().setUserId(id);
|
||||
m_library->refresh(); // re-load playlists with correct ownership now
|
||||
}
|
||||
});
|
||||
connect(m_backend, &QobuzBackend::favTracksLoaded, this, &MainWindow::onFavTracksLoaded);
|
||||
connect(m_backend, &QobuzBackend::favAlbumsLoaded, this, &MainWindow::onFavAlbumsLoaded);
|
||||
connect(m_backend, &QobuzBackend::favArtistsLoaded, this, &MainWindow::onFavArtistsLoaded);
|
||||
@@ -199,7 +206,10 @@ void MainWindow::tryRestoreSession()
|
||||
const QString token = AppSettings::instance().authToken();
|
||||
if (!token.isEmpty()) {
|
||||
m_backend->setToken(token);
|
||||
m_library->refresh();
|
||||
if (AppSettings::instance().userId() == 0)
|
||||
m_backend->getUser(); // userLoaded will call m_library->refresh()
|
||||
else
|
||||
m_library->refresh();
|
||||
const QString name = AppSettings::instance().displayName();
|
||||
statusBar()->showMessage(tr("Signed in as %1").arg(
|
||||
name.isEmpty() ? AppSettings::instance().userEmail() : name));
|
||||
|
||||
Reference in New Issue
Block a user