diff --git a/server/configApi.js b/server/configApi.js index 34b71da06..c45c4058e 100644 --- a/server/configApi.js +++ b/server/configApi.js @@ -711,8 +711,8 @@ class ConfigApi { global.lastReloadTime = Date.now(); } - // Trigger a discovery cycle if we have endpoints configured - if (endpoints.length > 0) { + // Trigger a discovery cycle if we have any endpoints configured (PVE or PBS) + if (endpoints.length > 0 || pbsConfigs.length > 0) { console.log('Triggering discovery cycle after configuration reload...'); // Import and call runDiscoveryCycle if available if (global.runDiscoveryCycle && typeof global.runDiscoveryCycle === 'function') { diff --git a/src/public/js/ui/settings.js b/src/public/js/ui/settings.js index e06a0a884..3d354373d 100644 --- a/src/public/js/ui/settings.js +++ b/src/public/js/ui/settings.js @@ -310,7 +310,7 @@ PulseApp.ui.settings = (() => {
@@ -893,7 +893,7 @@ PulseApp.ui.settings = (() => {
-
@@ -1067,7 +1067,20 @@ PulseApp.ui.settings = (() => { if (form.querySelector(`[name="${name}"]`).type === 'checkbox') { config[name] = 'true'; } else { - config[name] = value; + // Clean PBS_HOST entries - remove protocol and port if included + if (name.startsWith('PBS_HOST')) { + let cleanHost = value.trim(); + // Remove protocol (http:// or https://) + cleanHost = cleanHost.replace(/^https?:\/\//, ''); + // Remove port if it's included in the host (e.g., "192.168.1.1:8007") + const portMatch = cleanHost.match(/^([^:]+)(:\d+)?$/); + if (portMatch) { + cleanHost = portMatch[1]; + } + config[name] = cleanHost; + } else { + config[name] = value; + } } }