diff --git a/apps/wizarr-frontend/src/modules/settings/components/Forms/MediaForm.vue b/apps/wizarr-frontend/src/modules/settings/components/Forms/MediaForm.vue index 274eccf5..0144076b 100644 --- a/apps/wizarr-frontend/src/modules/settings/components/Forms/MediaForm.vue +++ b/apps/wizarr-frontend/src/modules/settings/components/Forms/MediaForm.vue @@ -162,11 +162,14 @@ export default defineComponent({ // Sanitize server_url and server_url_override to remove trailing slashes let server_url = this.serverForm.server_url.trim().replace(/\/$/, ""); - let server_url_override = this.serverForm.server_url_override ? this.serverForm.server_url_override.trim().replace(/\/$/, "") : null; + let server_url_override = this.serverForm.server_url_override ? this.serverForm.server_url_override.trim().replace(/\/$/, "") : ""; + + // Automatically set server_url_override to https://app.plex.tv if it contains plex.tv, otherwise leave it as is + server_url_override = server_url_override && server_url_override.includes('plex.tv') ? 'https://app.plex.tv' : server_url_override; formData.append("server_name", this.serverForm.server_name); formData.append("server_url", server_url); - if (this.serverForm.server_url_override) formData.append("server_url_override", server_url_override); + formData.append("server_url_override", server_url_override); formData.append("server_type", this.serverForm.server_type); formData.append("server_api_key", this.serverForm.server_api_key);