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:
Tommy Mikkelsen 2020-09-05 03:05:51 +02:00 committed by GitHub
commit 8494f945ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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