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:
joren
2026-03-24 11:23:45 +01:00
parent f30e2058c1
commit 75e2b623b8
6 changed files with 26 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ namespace List
/// Set which playlist is currently displayed (0 = none).
void setPlaylistContext(qint64 playlistId);
qint64 playlistId() const { return m_playlistId; }
/// Provide the user's playlist list for the "Add to playlist" submenu.
void setUserPlaylists(const QVector<QPair<qint64, QString>> &playlists);