feat(ui): add reactive status bar with notifications

This commit is contained in:
2025-10-04 23:36:09 -04:00
parent c30b205d9c
commit 38db835973
5 changed files with 239 additions and 1 deletions

View File

@@ -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 };
}