feat: artist sections, fav indicator, art scaling fix, volume popup fix

- Artist profile: collapsible Albums / EPs & Singles / Other sections
  keyed on release_type; fetches up to 200 albums per artist
- Favorites: starred icon on favorited tracks, context menu shows
  Add or Remove (not both); IDs cached when fav tracks are loaded
- Shuffle button: one-time shuffle via shuffleNow() without touching
  global shuffle flag, so double-click still plays in order
- Now-playing art: replaced setFixedHeight hack with ArtWidget that
  overrides hasHeightForWidth() — scales smoothly up and down, no min-size
- Volume popup: replaced QMenu (laggy, broken drag) with Qt::Popup QFrame;
  appears below button; fixed size locked at 100% label width

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joren
2026-03-24 17:56:47 +01:00
parent 75429faffe
commit 56473cae6f
15 changed files with 370 additions and 109 deletions

View File

@@ -283,6 +283,15 @@ void MainWindow::onTrackChanged(const QJsonObject &track)
void MainWindow::onFavTracksLoaded(const QJsonObject &result)
{
// Cache fav IDs so the star indicator and context menu stay in sync
QSet<qint64> ids;
const QJsonArray items = result["items"].toArray();
for (const QJsonValue &v : items) {
const qint64 id = static_cast<qint64>(v.toObject()["id"].toDouble());
if (id > 0) ids.insert(id);
}
m_content->tracksList()->setFavTrackIds(ids);
m_content->showFavTracks(result);
statusBar()->showMessage(
tr("%1 favorite tracks").arg(result["total"].toInt()), 4000);