Fix jellyfin auth endpoint

This commit is contained in:
jeffvli 2023-05-09 05:06:32 -07:00
parent bb27758310
commit 9b5bce34a0
3 changed files with 7 additions and 3 deletions

View file

@ -44,6 +44,7 @@ import {
import { jfApiClient } from '/@/renderer/api/jellyfin/jellyfin-api';
import { jfNormalize } from './jellyfin-normalize';
import { jfType } from '/@/renderer/api/jellyfin/jellyfin-types';
import packageJson from '../../../../package.json';
const formatCommaDelimitedString = (value: string[]) => {
return value.join(',');
@ -60,9 +61,12 @@ const authenticate = async (
const res = await jfApiClient({ server: null, url: cleanServerUrl }).authenticate({
body: {
Password: body.password,
Pw: body.password,
Username: body.username,
},
headers: {
'X-Emby-Authorization': `MediaBrowser Client="Feishin", Device="PC", DeviceId="Feishin", Version="${packageJson.version}"`,
},
});
if (res.status !== 200) {