compare_arrows
Manual Sync
-
- settings
+
+ settings
close
@@ -113,7 +113,7 @@
-
+
{{ getTitle(playingMetadata) }}
@@ -172,13 +172,14 @@ export default {
if (this.destroyed) {
return
}
+ console.log('Got command', data.command)
if (data.command === '/player/timeline/poll') {
let key = this.chosenKey
let ratingKey = null
if (key) {
ratingKey = '/library/metadata/' + key
}
-
+
let machineIdentifier = null
if (this.chosenServer) {
machineIdentifier = this.chosenServer.clientIdentifier
@@ -193,12 +194,16 @@ export default {
state: this.playerstatus
}
this.lastSentTimeline = playerdata
- this.eventbus.$emit('ptplayer-poll', (time) => {
- console.log('Poll time was out by', Math.abs(time - this.playertime))
- playerdata.time = time
- this.playertime = time
+ if (this.playerTime) {
+ this.eventbus.$emit('ptplayer-poll', (time) => {
+ console.log('Poll time was out by', Math.abs(time - this.playertime))
+ playerdata.time = time
+ this.playertime = time
+ data.callback(playerdata)
+ })
+ } else {
data.callback(playerdata)
- })
+ }
return
}
if (data.command === '/player/playback/play') {
diff --git a/src/store/modules/plex/helpers/PlexClient.js b/src/store/modules/plex/helpers/PlexClient.js
index 810a6eaf..4b9523d8 100644
--- a/src/store/modules/plex/helpers/PlexClient.js
+++ b/src/store/modules/plex/helpers/PlexClient.js
@@ -97,7 +97,7 @@ module.exports = function PlexClient () {
}
var _url = connection.uri + command + '?' + query
this.setValue('commandId', this.commandId + 1)
- var options = PlexAuth.getClientApiOptions(_url, this.clientIdentifier, this.uuid, 5000)
+ var options = PlexAuth.getClientApiOptions(_url, this.clientIdentifier, this.uuid, 5000)
axios.get(connection.uri + command, {
params,
headers: options.headers
@@ -204,13 +204,17 @@ module.exports = function PlexClient () {
}
this.waitForMovement = function (startTime) {
return new Promise((resolve, reject) => {
+ let time = 500
+ if (this.clientIdentifier === 'PTPLAYER9PLUS10') {
+ time = 10
+ }
let timer = setInterval(async () => {
let now = await this.getTimeline()
if (now.time !== startTime) {
resolve()
clearInterval(timer)
}
- }, 500)
+ }, time)
})
}
this.skipAhead = function (current, duration) {
@@ -238,7 +242,9 @@ module.exports = function PlexClient () {
const difference = Math.abs((parseInt(this.lastTimelineObject.time)) - parseInt(hostTimeline.time))
console.log('Difference', difference)
- if (parseInt(difference) > parseInt(SYNCFLEXABILITY)) {
+ let bothPaused = hostTimeline.playerState === 'paused' && this.lastTimelineObject.state === 'paused'
+
+ if (parseInt(difference) > parseInt(SYNCFLEXABILITY) || (bothPaused && difference > 10)) {
// We need to seek!
console.log('STORE: we need to seek as we are out by', difference)
// Decide what seeking method we want to use