fix(frontend): use V2 favorites commands in QueuePanel
The toggleCurrentTrackFavorite function was calling non-existent add_track_to_favorites/remove_track_from_favorites commands. Updated to use v2_add_favorite/v2_remove_favorite with proper params.
This commit is contained in:
1 parent
20580b170c
commit
214f578618
1 file changed
+2
-2
@@ -141,10 +141,10 @@
|
||||
if (!currentTrack?.trackId) return;
|
||||
try {
|
||||
if (currentTrackFavorite) {
|
||||
await invoke('remove_track_from_favorites', { trackId: currentTrack.trackId });
|
||||
await invoke('v2_remove_favorite', { favType: 'tracks', itemId: String(currentTrack.trackId) });
|
||||
currentTrackFavorite = false;
|
||||
} else {
|
||||
await invoke('add_track_to_favorites', { trackId: currentTrack.trackId });
|
||||
await invoke('v2_add_favorite', { favType: 'tracks', itemId: String(currentTrack.trackId) });
|
||||
currentTrackFavorite = true;
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user