Improve parity with upstream (#155)

See https://github.com/gesellix/Bose-SoundTouch/issues/135
This commit is contained in:
Tobias Gesellchen
2026-04-07 14:44:05 +02:00
committed by GitHub
parent 276d01fe42
commit 68f8efce4e
15 changed files with 918 additions and 234 deletions
@@ -77,7 +77,15 @@ GET {{host}}/accounts/{{accountId}}/sources
client.assert(id !== undefined && id !== "", "Spotify source ID missing");
client.global.set("spotify_source_id", id);
const secretType = spotifySource.getAttribute("secretType");
function getCredentialType(source) {
const credentials = source.getElementsByTagName("credential");
if (credentials && credentials.length > 0) {
return credentials[0].getAttribute("type");
}
return null;
}
const secretType = getCredentialType(spotifySource);
client.assert(secretType === "token_version_3", "Wrong secret type in Marge: " + secretType);
});
%}