feat(v2): add Library and Offline V2 command wrappers
Add V2 wrappers for frequently used commands: - Library: play_track, get_albums, get_tracks_by_ids, check_folder_accessible, set_album_hidden, get_scan_progress, clear_artwork_cache, clear_thumbnails_cache, remove_folder, set_album_artwork - Offline: get_pending_playlists, playlist_get_all_local_track_counts
This commit is contained in:
1 parent
e4fe4598d0
commit
8d3627b743
4 files changed
+136
-2
No files matched your search
@@ -235,7 +235,7 @@ async function copyToClipboard(text: string, successMessage: string): Promise<vo
|
||||
|
||||
export async function shareQobuzTrackLink(trackId: number): Promise<void> {
|
||||
try {
|
||||
const url = await invoke<string>('get_qobuz_track_url', { trackId });
|
||||
const url = await invoke<string>('v2_get_qobuz_track_url', { trackId });
|
||||
await copyToClipboard(url, 'Qobuz link copied');
|
||||
} catch (err) {
|
||||
console.error('Failed to get Qobuz link:', err);
|
||||
|
||||
@@ -575,7 +575,7 @@ async function handlePlaybackEvent(event: PlaybackEvent): Promise<void> {
|
||||
// Sync queue state when track changes externally (e.g., from remote control)
|
||||
syncQueueState().catch(err => console.error('[Player] Failed to sync queue:', err));
|
||||
try {
|
||||
const queueTrack = await invoke<QueueTrack | null>('get_current_queue_track');
|
||||
const queueTrack = await invoke<QueueTrack | null>('v2_get_current_queue_track');
|
||||
if (queueTrack && queueTrack.id === event.track_id) {
|
||||
const rawRate = queueTrack.sample_rate ?? undefined;
|
||||
const normalizedRate = rawRate == null
|
||||
|
||||
Reference in new issue
Block a user