fix(backend): update jellyfin.ts for 10.8.0

This commit is contained in:
Aiden Vigue
2021-06-14 12:27:07 -04:00
parent 508fccae4e
commit e5c6b9cd74
2 changed files with 7 additions and 3 deletions

View File

@@ -246,7 +246,7 @@ settingsRoutes.get('/jellyfin/library', async (req, res) => {
if (req.query.sync) {
const userRepository = getRepository(User);
const admin = await userRepository.findOneOrFail({
select: ['id', 'jellyfinAuthToken', 'jellyfinDeviceId'],
select: ['id', 'jellyfinAuthToken', 'jellyfinDeviceId', 'jellyfinUserId'],
order: { id: 'ASC' },
});
const jellyfinClient = new JellyfinAPI(
@@ -255,6 +255,8 @@ settingsRoutes.get('/jellyfin/library', async (req, res) => {
admin.jellyfinDeviceId ?? ''
);
jellyfinClient.setUserId(admin.jellyfinUserId ?? '');
const libraries = await jellyfinClient.getLibraries();
const newLibraries: Library[] = libraries.map((library) => {