 {
                        'Content-Type': 'application/json'
                    }
                });
                const data = await response.json();
                if (data.success) {
                    document.getElementById('dlcDirectory').value = data.path;
                    // Automatically update when folder is selected
                    updateDlcDirectory();
                } else {
                    console.error('Failed to select directory:', data.error);
                }
          