mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(plex): include 'Overseerr' in X-Plex-Device-Name header (#2635)
This commit is contained in:
@@ -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',
|
||||||
|
Reference in New Issue
Block a user