|
|
@ -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',
|
|
|
|