feat: refresh views on all playlist mutations
- Add EV_PLAYLIST_TRACK_ADDED (22) — emitted when a track is successfully added to a playlist - If the currently-open playlist is the one modified, re-fetch it so the track appears in the list immediately - After creating a playlist, open it automatically so the user lands in the new (empty) playlist view right away - Sidebar already refreshes on create/delete; this ensures the track list view also stays in sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -241,6 +241,9 @@ void QobuzBackend::onEvent(int eventType, const QString &json)
|
||||
case 21: // EV_PLAYLIST_DELETED
|
||||
emit playlistDeleted(obj);
|
||||
break;
|
||||
case 22: // EV_PLAYLIST_TRACK_ADDED
|
||||
emit playlistTrackAdded(static_cast<qint64>(obj["playlist_id"].toDouble()));
|
||||
break;
|
||||
case EV_GENERIC_ERR:
|
||||
case EV_TRACK_URL_ERR:
|
||||
emit error(obj["error"].toString());
|
||||
|
||||
Reference in New Issue
Block a user