Merge pull request #1720 from croneter/py3-fix-widgets
Fix playback report for widget not working if direct paths are used
This commit is contained in:
commit
42df1f2f55
2 changed files with 5 additions and 1 deletions
|
@ -308,7 +308,7 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
initialize = False
|
initialize = False
|
||||||
if initialize:
|
if initialize:
|
||||||
LOG.debug('Need to initialize Plex and PKC playqueue')
|
LOG.debug('Need to initialize Plex and PKC playqueue')
|
||||||
if not kodi_id or not kodi_type:
|
if not kodi_id or not kodi_type or not path:
|
||||||
kodi_id, kodi_type, path = self._json_item(playerid)
|
kodi_id, kodi_type, path = self._json_item(playerid)
|
||||||
plex_id, plex_type = self._get_ids(kodi_id, kodi_type, path)
|
plex_id, plex_type = self._get_ids(kodi_id, kodi_type, path)
|
||||||
if not plex_id:
|
if not plex_id:
|
||||||
|
|
|
@ -246,9 +246,13 @@ class PlaylistItem(object):
|
||||||
def init_streams(self):
|
def init_streams(self):
|
||||||
"""
|
"""
|
||||||
Initializes all streams after Kodi has started playing this video
|
Initializes all streams after Kodi has started playing this video
|
||||||
|
WARNING: KODI TAKES FOREVER TO INITIALIZE STREAMS AFTER PLAYBACK
|
||||||
|
STARTUP. YOU WONT GET THE CORRECT NUMBER OFAUDIO AND SUB STREAMS RIGHT
|
||||||
|
AFTER STARTUP. Seems like you need to wait a couple of seconds
|
||||||
"""
|
"""
|
||||||
if not app.PLAYSTATE.item == self:
|
if not app.PLAYSTATE.item == self:
|
||||||
# Already stopped playback or skipped to the next one
|
# Already stopped playback or skipped to the next one
|
||||||
|
LOG.warn('Skipping init_streams!')
|
||||||
return
|
return
|
||||||
self.init_kodi_streams()
|
self.init_kodi_streams()
|
||||||
self.switch_to_plex_stream('video')
|
self.switch_to_plex_stream('video')
|
||||||
|
|
Loading…
Reference in a new issue