fix(plex): include 'Overseerr' in X-Plex-Device-Name header (#2635)

pull/2636/head
TheCatLady 3 years ago committed by GitHub
parent 26a3d7c4d2
commit d4f9650cd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,10 +48,10 @@ class PlexOAuth {
); );
} }
let clientId = localStorage.getItem('overseerrPlexClientId'); let clientId = localStorage.getItem('plex-client-id');
if (!clientId) { if (!clientId) {
const uuid = uuidv4(); const uuid = uuidv4();
localStorage.setItem('overseerrPlexClientId', uuid); localStorage.setItem('plex-client-id', uuid);
clientId = uuid; clientId = uuid;
} }
@ -59,13 +59,13 @@ class PlexOAuth {
this.plexHeaders = { this.plexHeaders = {
Accept: 'application/json', Accept: 'application/json',
'X-Plex-Product': 'Overseerr', 'X-Plex-Product': 'Overseerr',
'X-Plex-Version': '2.0', 'X-Plex-Version': 'Plex OAuth',
'X-Plex-Client-Identifier': clientId, 'X-Plex-Client-Identifier': clientId,
'X-Plex-Model': 'Plex OAuth', 'X-Plex-Model': 'Plex OAuth',
'X-Plex-Platform': browser.getOSName(), 'X-Plex-Platform': browser.getBrowserName(),
'X-Plex-Platform-Version': browser.getOSVersion(), 'X-Plex-Platform-Version': browser.getBrowserVersion(),
'X-Plex-Device': browser.getBrowserName(), 'X-Plex-Device': browser.getOSName(),
'X-Plex-Device-Name': browser.getBrowserVersion(), 'X-Plex-Device-Name': `${browser.getBrowserName()} (Overseerr)`,
'X-Plex-Device-Screen-Resolution': 'X-Plex-Device-Screen-Resolution':
window.screen.width + 'x' + window.screen.height, window.screen.width + 'x' + window.screen.height,
'X-Plex-Language': 'en', 'X-Plex-Language': 'en',

Loading…
Cancel
Save