OAuth Client Identifier

This commit is contained in:
Sam 2018-05-27 02:34:14 +10:00
parent 9544ed1c86
commit 46d0284ba9
3 changed files with 8 additions and 5 deletions

View File

@ -196,7 +196,8 @@ export default {
this.lastSentTimeline = playerdata
if (this.playerTime) {
this.eventbus.$emit('ptplayer-poll', (time) => {
console.log('Poll time was out by', Math.abs(time - this.playertime))
let difference = Math.abs(time - this.playertime)
console.log('Poll time was out by', difference)
playerdata.time = time
this.playertime = time
data.callback(playerdata)

View File

@ -62,7 +62,7 @@ export default {
'X-Plex-Product': 'SyncLounge',
'X-Plex-Version': this.$store.state.appVersion,
'X-Plex-Platform-Version': '',
'X-Plex-Client-Identifier': 'SyncLounge v' + this.$store.state.appVersion
'X-Plex-Client-Identifier': this.$store.state.settings.CLIENTIDENTIFIER
},
code: null,
ready: false

View File

@ -37,7 +37,8 @@ let defaultSettings = {
SYNCMODE: 'cleanseak',
SYNCFLEXABILITY: 3000,
CUSTOMSERVER: 'http://',
SLPLAYERFORCETRANSCODE: true
SLPLAYERFORCETRANSCODE: true,
CLIENTIDENTIFIER: generateGuid() + '-' + generateGuid()
}
for (let i in defaultSettings) {
if (getSetting(i) === undefined || getSetting(i) === null) {
@ -50,7 +51,7 @@ function generateGuid () {
.toString(16)
.substring(1)
}
return s4() + s4() + s4() + s4()
return s4() + s4() + '-' + s4() + s4()
}
// Set up out web app socket for fetching short urls
@ -89,7 +90,8 @@ const state = {
PTPLAYERVOLUME: getSetting('PTPLAYERVOLUME'),
SLPLAYERFORCETRANSCODE: getSetting('SLPLAYERFORCETRANSCODE'),
HIDEUSERNAME: getSetting('HIDEUSERNAME'),
ALTUSERNAME: getSetting('ALTUSERNAME')
ALTUSERNAME: getSetting('ALTUSERNAME'),
CLIENTIDENTIFIER: getSetting('CLIENTIDENTIFIER')
},
LASTSERVER: getSetting('LASTSERVER'),