Fix for PMP version 1.3.6.699-b7573ff0
This commit is contained in:
parent
074dcade33
commit
fa8127386f
|
@ -29,18 +29,40 @@ module.exports = function PlexAuth () {
|
|||
* @param timeout
|
||||
* @returns {{url: *, time: boolean, headers: {X-Plex-Device-Name: string, X-Plex-Client-Identifier: string, X-Plex-Provides: string, X-Plex-Target-Client-Identifier: *}, timeout: *, method: string}}
|
||||
*/
|
||||
this.getClientApiOptions = function (url, clientIdentifier, uuid, timeout) {
|
||||
this.getClientApiOptions = function (url, clientIdentifier, uuid, timeout) {
|
||||
var sBrowser, sUsrAg = navigator.userAgent;
|
||||
if (sUsrAg.indexOf("Chrome") > -1) {
|
||||
sBrowser = "Chrome";
|
||||
} else if (sUsrAg.indexOf("Safari") > -1) {
|
||||
sBrowser = "Safari";
|
||||
} else if (sUsrAg.indexOf("Opera") > -1) {
|
||||
sBrowser = "Opera";
|
||||
} else if (sUsrAg.indexOf("Firefox") > -1) {
|
||||
sBrowser = "Firefox";
|
||||
} else if (sUsrAg.indexOf("MSIE") > -1) {
|
||||
sBrowser = "Microsoft Internet Explorer";
|
||||
}
|
||||
return {
|
||||
url: url,
|
||||
time: true,
|
||||
headers: {
|
||||
'X-Plex-Device-Name': 'PlexTogether',
|
||||
'X-Plex-Device-Name': sBrowser ,
|
||||
'X-Plex-Client-Identifier': 'PlexTogether',
|
||||
'X-Plex-Provides': 'controller',
|
||||
'X-Plex-Target-Client-Identifier': clientIdentifier
|
||||
'X-Plex-Target-Client-Identifier': clientIdentifier,
|
||||
'X-Plex-Device': 'Web (' + sBrowser + ')',
|
||||
'X-Plex-Platform': 'PlexTogether',
|
||||
'X-Plex-Version': '4.18',
|
||||
'X-Plex-Client-Platform': 'Web',
|
||||
'X-Plex-Client-Product': 'PlexTogether for Web',
|
||||
'X-Plex-Product': 'PlexTogether',
|
||||
'X-Plex-Device-Vendor': sBrowser,
|
||||
'X-Plex-Platform-Version': '11.0',
|
||||
'Accept': 'application/json',
|
||||
'X-Plex-Http-Pipeline': 'infinite'
|
||||
},
|
||||
timeout: timeout,
|
||||
method: 'GET'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,6 +30,8 @@ module.exports = function PlexClient () {
|
|||
this.tempId = null
|
||||
this.events = new EventEmitter()
|
||||
|
||||
this.userData = null
|
||||
|
||||
// Latest objects for reference in the future
|
||||
this.lastRatingKey = null
|
||||
this.lastTimelineObject = null
|
||||
|
@ -94,7 +96,7 @@ module.exports = function PlexClient () {
|
|||
}
|
||||
connection = that.chosenConnection
|
||||
}
|
||||
var query = ''
|
||||
var query = 'type=video&'
|
||||
for (let key in params) {
|
||||
query += encodeURIComponent(key) + '=' + encodeURIComponent(params[key]) + '&'
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ module.exports = function () {
|
|||
}
|
||||
tempClient.plexConnections = tempConnectionsArray
|
||||
tempClient.subscribePort = that.httpServerPort
|
||||
tempClient.userData = that.user
|
||||
that.clients.push(tempClient)
|
||||
/*
|
||||
tempClient.checkConnectability(function(result,me){
|
||||
|
|
|
@ -750,7 +750,7 @@ const plexTogether = {
|
|||
function cleanSeek () {
|
||||
state.decisionBlocked = true
|
||||
rootState.chosenClient.seekTo(parseInt(hostTimeline.time), function (result) {
|
||||
console.log('Result from within store for seek was ' + result)
|
||||
console.log('Result from within store for seek was ', result)
|
||||
console.log('Setting decision blocked to false ')
|
||||
state.decisionBlocked = false
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue