diff --git a/web_server.py b/web_server.py index 425c55f8..fdef812a 100644 --- a/web_server.py +++ b/web_server.py @@ -10855,9 +10855,10 @@ def get_active_processes(): "auto_initiated": batch_data.get('auto_initiated', False), "auto_processing_timestamp": batch_data.get('auto_processing_timestamp'), "should_show_modal": True, # Wishlist processes should always be visible - "is_background_process": batch_data.get('auto_initiated', False) + "is_background_process": batch_data.get('auto_initiated', False), + "current_cycle": batch_data.get('current_cycle') # Pass category filter to frontend }) - + # Add current auto-processing state for frontend awareness with wishlist_timer_lock: process_info["auto_processing_active"] = wishlist_auto_processing diff --git a/webui/static/script.js b/webui/static/script.js index e358c32e..15ff1298 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -2588,7 +2588,7 @@ async function rehydrateDiscoverPlaylistModal(virtualPlaylistId, playlistName, b } async function rehydrateModal(processInfo, userRequested = false) { - const { playlist_id, playlist_name, batch_id } = processInfo; + const { playlist_id, playlist_name, batch_id, current_cycle } = processInfo; console.log(`💧 Rehydrating modal for "${playlist_name}" (batch: ${batch_id}) - User requested: ${userRequested}`); // Handle YouTube virtual playlists - skip rehydration here, handled by YouTube system @@ -2651,8 +2651,8 @@ async function rehydrateModal(processInfo, userRequested = false) { if (userRequested) { console.log(`💧 [Rehydrate] User requested - creating wishlist modal for active process: ${batch_id}`); - // Create the modal with current server state - await openDownloadMissingWishlistModal(); + // Create the modal with current server state (pass category filter for auto-processing) + await openDownloadMissingWishlistModal(current_cycle); const process = activeDownloadProcesses[playlist_id]; if (!process) { console.error('❌ [Rehydrate] Failed to create wishlist process in activeDownloadProcesses');