diff --git a/src/main.js b/src/main.js
index 2865672..4901040 100644
--- a/src/main.js
+++ b/src/main.js
@@ -30,7 +30,7 @@ import {
saveEditPlaylist, editPlUploadCover, editPlCoverSelected, editPlRemoveCover,
deletePlaylist, _confirmOk, _confirmCancel,
toggleMobileSearch, closeMobileSearch, switchSetupTab,
- toggleNotifPanel, deleteNotif, clearNotifs, initNotifBell,
+ toggleNotifPanel, deleteNotif, clearNotifs, initNotifBell, _notifNavigate,
} from './ui.js';
// ─── CONNECT ───
@@ -241,7 +241,7 @@ Object.assign(window, {
openEditPlModal, closeEditPlModal, saveEditPlaylist,
editPlUploadCover, editPlCoverSelected, editPlRemoveCover, deletePlaylist, _confirmOk, _confirmCancel,
toggleMobileSearch, closeMobileSearch, switchSetupTab,
- toggleNotifPanel, deleteNotif, clearNotifs,
+ toggleNotifPanel, deleteNotif, clearNotifs, _notifNavigate,
// App
doConnect, disconnect,
});
diff --git a/src/ui.js b/src/ui.js
index 350886d..bc2b8e2 100644
--- a/src/ui.js
+++ b/src/ui.js
@@ -273,7 +273,7 @@ export async function executeDownload() {
collectionId: S.downloadTarget.collectionId || null,
explicit: S.downloadTarget.trackExplicitness === 'explicit',
};
- addJob(jobId, payload.title, payload.artist);
+ addJob(jobId, payload.title, payload.artist, payload.type);
try {
const res = await fetch(`${S.cfg.backendUrl}/api/download`, {
method: 'POST', headers: {'Content-Type':'application/json'},
@@ -291,7 +291,7 @@ export async function executeDownload() {
export async function executeSpotifyDownload({ type, title, artist, artworkUrl, tracks, createPlaylist, playlistName }) {
if (!S.cfg.backendUrl) { toast('⚠ Kein Backend konfiguriert'); return; }
const jobId = 'job_' + Date.now();
- addJob(jobId, title, artist);
+ addJob(jobId, title, artist, type);
try {
const res = await fetch(`${S.cfg.backendUrl}/api/download`, {
method: 'POST',
@@ -344,10 +344,11 @@ async function _createNdPlaylist(tracks, name) {
return;
}
const songParams = songIds.map(id => `&songId=${encodeURIComponent(id)}`).join('');
- await api('createPlaylist', `&name=${encodeURIComponent(name)}${songParams}`);
+ const plRes = await api('createPlaylist', `&name=${encodeURIComponent(name)}${songParams}`);
+ const plId = plRes.playlist?.id || null;
const msg = `${songIds.length}/${tracks.length} Tracks hinzugefügt${missing.length ? `, ${missing.length} nicht gefunden` : ''}`;
toast(`✅ Playlist "${name}" mit ${songIds.length}/${tracks.length} Tracks erstellt`);
- _addNotif({ id: 'pl_' + Date.now(), title: `Playlist: ${name}`, artist: '', status: 'done', message: msg, missing, timestamp: Date.now(), read: false });
+ _addNotif({ id: 'pl_' + Date.now(), title: `Playlist: ${name}`, artist: '', status: 'done', message: msg, missing, timestamp: Date.now(), read: false, navType: 'playlist', navId: plId, navName: name });
} catch(e) {
toast('Playlist-Erstellung fehlgeschlagen: ' + e.message);
}
@@ -425,6 +426,10 @@ function _renderNotifList() {
const missingHtml = n.missing?.length
? `${n.missing.length} Track${n.missing.length > 1 ? 's' : ''} nicht in Navidrome gefunden
${n.missing.map(f => `