mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-27 05:20:22 +00:00
Merge pull request #137 from WebTools-NG/#94-Export-Episodes-as-well
#94 Added OS platform to header as well
This commit is contained in:
commit
8494f945ef
1 changed files with 21 additions and 2 deletions
|
@ -14,15 +14,34 @@ const wtutils = new class WTUtils {
|
|||
constructor() {
|
||||
}
|
||||
|
||||
get PMSHeader(){
|
||||
get PMSHeader(){
|
||||
var headers = {
|
||||
"Accept": "application/json",
|
||||
"X-Plex-Client-Identifier": this.X_Plex_Client_Identifier,
|
||||
"X-Plex-Product": this.AppName + '_' + this.AppVersion
|
||||
"X-Plex-Product": this.AppName,
|
||||
"X-Plex-Version": this.AppVersion,
|
||||
"X-Plex-Device": this.Platform
|
||||
}
|
||||
return headers
|
||||
}
|
||||
|
||||
get Platform() {
|
||||
let OS = undefined;
|
||||
if (this.isMac())
|
||||
{
|
||||
OS = 'Mac'
|
||||
}
|
||||
else if (this.isLinux())
|
||||
{
|
||||
OS = 'Linux'
|
||||
}
|
||||
else if (this.isWindows())
|
||||
{
|
||||
OS = 'Windows'
|
||||
}
|
||||
return OS
|
||||
}
|
||||
|
||||
// Get X_Plex_Client_Identifier, or create one if not set
|
||||
get X_Plex_Client_Identifier() {
|
||||
let result = wtconfig.get('General.X_Plex_Client_Identifier' )
|
||||
|
|
Loading…
Reference in a new issue