Fix Plex Companion thinking video is playing again

- Fixes #449
This commit is contained in:
croneter 2018-04-02 18:07:49 +02:00
parent 98a544a764
commit 5b58db6cec

View file

@ -197,7 +197,7 @@ class SubscriptionMgr(object):
if pbmc_server: if pbmc_server:
(self.protocol, self.server, self.port) = pbmc_server.split(':') (self.protocol, self.server, self.port) = pbmc_server.split(':')
self.server = self.server.replace('/', '') self.server = self.server.replace('/', '')
status = 'paused' if info['speed'] == '0' else 'playing' status = 'paused' if int(info['speed']) == 0 else 'playing'
duration = kodi_time_to_millis(info['totaltime']) duration = kodi_time_to_millis(info['totaltime'])
shuffle = '1' if info['shuffled'] else '0' shuffle = '1' if info['shuffled'] else '0'
mute = '1' if info['muted'] is True else '0' mute = '1' if info['muted'] is True else '0'
@ -362,7 +362,7 @@ class SubscriptionMgr(object):
item = playqueue.items[info['position']] item = playqueue.items[info['position']]
except IndexError: except IndexError:
return self.last_params return self.last_params
status = 'paused' if info['speed'] == '0' else 'playing' status = 'paused' if int(info['speed']) == 0 else 'playing'
params = { params = {
'state': status, 'state': status,
'ratingKey': item.plex_id, 'ratingKey': item.plex_id,