diff --git a/webui/static/downloads.js b/webui/static/downloads.js index 67df1945..d164f615 100644 --- a/webui/static/downloads.js +++ b/webui/static/downloads.js @@ -4401,12 +4401,15 @@ async function startPlaylistSync(playlistId, syncModeOverride = null) { let syncMode = syncModeOverride; if (!syncMode) { const modeSelect = document.getElementById(`sync-mode-${playlistId}`); - syncMode = (modeSelect && modeSelect.value) || 'replace'; + // Empty value = "use the Settings default" — send nothing so the + // backend falls back to playlist_sync.mode (#792). Don't hardcode + // 'replace' here or it shadows the global setting. + syncMode = (modeSelect && modeSelect.value) || ''; } - if (syncMode !== 'replace' && syncMode !== 'append') { - syncMode = 'replace'; + if (syncMode && !['replace', 'reconcile', 'append'].includes(syncMode)) { + syncMode = ''; } - console.log(`🚀 [${new Date().toTimeString().split(' ')[0]}] Starting sync for playlist: ${playlistId} (mode: ${syncMode})`); + console.log(`🚀 [${new Date().toTimeString().split(' ')[0]}] Starting sync for playlist: ${playlistId} (mode: ${syncMode || 'default(setting)'})`); const playlist = spotifyPlaylists.find(p => p.id === playlistId); if (!playlist) { console.error(`❌ Could not find playlist data for ID: ${playlistId}`); diff --git a/webui/static/shared-helpers.js b/webui/static/shared-helpers.js index e641daf9..a55b7027 100644 --- a/webui/static/shared-helpers.js +++ b/webui/static/shared-helpers.js @@ -1265,8 +1265,10 @@ function playlistModalDownloadSyncFooterHtml(playlistId, options = {}) { } return `${downloadBtns} - + + + `;