fix(jellyfin): use the same deviceId for admins (#1710)
* fix(jellyfin): use the same deviceId for admins This PR will make Jellyseerr use the same deviceId for the admin user everytime he logins to Jellyfin/Emby. The previous behavior with different deviceId was creating new entries on the media at every request. * fix: remove useless check
This commit is contained in:
@@ -421,7 +421,9 @@ userSettingsRoutes.post<{ username: string; password: string }>(
|
||||
|
||||
const hostname = getHostname();
|
||||
const deviceId = Buffer.from(
|
||||
`BOT_jellyseerr_${req.user.username ?? ''}`
|
||||
req.user?.id === 1
|
||||
? 'BOT_jellyseerr'
|
||||
: `BOT_jellyseerr_${req.user.username ?? ''}`
|
||||
).toString('base64');
|
||||
|
||||
const jellyfinserver = new JellyfinAPI(hostname, undefined, deviceId);
|
||||
|
||||
Reference in New Issue
Block a user