diff --git a/web_server.py b/web_server.py index f4a897ce..cb869f23 100644 --- a/web_server.py +++ b/web_server.py @@ -21053,10 +21053,17 @@ def _get_source_playlist_states(states, error_label, info_log_label=None): def _submit_sync_task(sync_playlist_id, playlist_name, spotify_tracks, playlist_image_url): """Submit a sync to the shared executor (closes over sync_executor / _run_sync_task / get_current_profile_id so the lifted start_sync helper - stays free of those globals).""" + stays free of those globals). + + Used by ALL per-source discovery syncs (Spotify-Public/Tidal/Deezer/Qobuz/ + YouTube/iTunes-link/ListenBrainz/Beatport). These have no per-request mode + selector, so honor the configured default (Settings > Playlist sync mode) — + otherwise they always ran 'replace' regardless of the setting (#792).""" + from core.sync.playlist_edit import normalize_sync_mode + _mode = normalize_sync_mode(None, config_manager.get('playlist_sync.mode', 'replace')) return sync_executor.submit( _run_sync_task, sync_playlist_id, playlist_name, spotify_tracks, - None, get_current_profile_id(), playlist_image_url, + None, get_current_profile_id(), playlist_image_url, _mode, )