diff --git a/package.json b/package.json index bf5c5a05..3904f29a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "babel-eslint": "^8.2.2", "body-parser": "^1.18.2", "cors": "^2.8.3", + "git-rev": "^0.2.1", "jsonfile": "^4.0.0", "sails-disk": "^1.0.1", "socket.io": "^2.0.3", diff --git a/src/components/application/plexbrowser.vue b/src/components/application/plexbrowser.vue index 989ed32a..3a2b263d 100644 --- a/src/components/application/plexbrowser.vue +++ b/src/components/application/plexbrowser.vue @@ -94,6 +94,8 @@
{{ server.name }}
v{{ server.productVersion }}
Owned by {{ ownerOfServer(server) }}
+
Unable to connect
+
Try disabling your adblocker
@@ -101,29 +103,6 @@ - - - - - - - - -
-
{{ device.name }}
-
v{{ device.productVersion }}
-
Owned by {{ ownerOfServer(device) }}
-
Unable to connect
-
-
-
-
-
-
diff --git a/src/components/application/plexbrowser/plexcontent.vue b/src/components/application/plexbrowser/plexcontent.vue index 6d314f80..cace15f2 100644 --- a/src/components/application/plexbrowser/plexcontent.vue +++ b/src/components/application/plexbrowser/plexcontent.vue @@ -7,7 +7,7 @@
-
+
diff --git a/src/components/application/ptplayer.vue b/src/components/application/ptplayer.vue index 7deba6f0..f612295a 100644 --- a/src/components/application/ptplayer.vue +++ b/src/components/application/ptplayer.vue @@ -22,7 +22,7 @@ - +

{{ getTitle(playingMetadata) }}

@@ -35,14 +35,14 @@
- +
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