Fix jellyfin external url basepath being ignored

This commit is contained in:
Samuel Bartík
2022-10-13 23:24:09 +02:00
committed by GitHub
parent 5b10da4073
commit 0faae20bac
4 changed files with 14 additions and 10 deletions

View File

@@ -244,10 +244,11 @@ authRoutes.post('/jellyfin', async (req, res, next) => {
}
// First we need to attempt to log the user in to jellyfin
const jellyfinserver = new JellyfinAPI(hostname ?? '', undefined, deviceId);
const jellyfinHost =
externalHostname && externalHostname.length > 0
? externalHostname
: hostname;
let jellyfinHost =
externalHostname && externalHostname.length > 0
? externalHostname
: hostname;
jellyfinHost = jellyfinHost.endsWith("/") ? jellyfinHost.slice(0, -1) : jellyfinHost;
const account = await jellyfinserver.login(body.username, body.password);
// Next let's see if the user already exists