mirror of
https://github.com/markuryy/shark.git
synced 2025-12-15 04:41:01 +00:00
feat(ui): add reactive status bar with notifications
This commit is contained in:
@@ -8,6 +8,7 @@ import { addToQueue } from '$lib/stores/downloadQueue';
|
||||
import { settings } from '$lib/stores/settings';
|
||||
import { deezerAuth } from '$lib/stores/deezer';
|
||||
import { trackExists } from './downloader';
|
||||
import { setInfo, setWarning } from '$lib/stores/status';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
/**
|
||||
@@ -103,6 +104,7 @@ export async function addDeezerTrackToQueue(trackId: string): Promise<{ added: b
|
||||
|
||||
if (exists) {
|
||||
console.log(`[AddToQueue] Skipping "${track.title}" - already exists`);
|
||||
setWarning(`Skipped: ${track.title} (already exists)`);
|
||||
return { added: false, reason: 'already_exists' };
|
||||
}
|
||||
}
|
||||
@@ -117,5 +119,6 @@ export async function addDeezerTrackToQueue(trackId: string): Promise<{ added: b
|
||||
downloadObject: track
|
||||
});
|
||||
|
||||
setInfo(`Queued: ${track.title}`);
|
||||
return { added: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user