fix(plex): test connection not fully checking connection (#4617)

This commit is contained in:
Meier Lukas
2025-12-10 13:28:28 +01:00
committed by GitHub
parent 85689caf6c
commit 6a908397cd

View File

@@ -169,17 +169,15 @@ export class PlexIntegration extends Integration implements IMediaServerIntegrat
protected async testingAsync(input: IntegrationTestingInput): Promise<TestingResult> {
const token = super.getSecretValue("apiKey");
const response = await input.fetchAsync(this.url("/"), {
const response = await input.fetchAsync(super.url("/prefs"), {
headers: {
"X-Plex-Token": token,
Accept: "application/json",
},
});
if (!response.ok) return TestConnectionError.StatusResult(response);
const result = await response.text();
await PlexIntegration.parseXmlAsync<PlexResponse>(result);
return { success: true };
}