diff --git a/resources/lib/playback.py b/resources/lib/playback.py index b29e4364..4619bcf5 100644 --- a/resources/lib/playback.py +++ b/resources/lib/playback.py @@ -36,9 +36,6 @@ def playback_triage(plex_id=None, plex_type=None, path=None, resolve=True): Hit this function for addon path playback, Plex trailers, etc. Will setup playback first, then on second call complete playback. - path: either the complete plugin://plugin.video.plexkodiconnect path - OR just the query '?plex_id=458160&mode=play&plex_type=movie' - Will set Playback_Successful() with potentially a PKC_ListItem() attached (to be consumed by setResolvedURL in default.py) @@ -68,7 +65,7 @@ def playback_triage(plex_id=None, plex_type=None, path=None, resolve=True): LOG.debug('playQueue position: %s for %s', pos, playqueue) # Have we already initiated playback? try: - item = playqueue.items[pos] + playqueue.items[pos] except IndexError: # Release our default.py before starting our own Kodi player instance if resolve is True: @@ -78,20 +75,8 @@ def playback_triage(plex_id=None, plex_type=None, path=None, resolve=True): pickle_me(result) playback_init(plex_id, plex_type, playqueue) else: - if item.playback_init is False: - # Hack: we need to use setResolvedUrl twice. Otherwise, Kodi - # overwrites the path in the Kodi database (addon-path) with the - # result of the first setResolvedUrl - item.playback_init = True - if not path.startswith('plugin://'): - path = 'plugin://%s%s' % (v.ADDON_ID, path) - LOG.debug('Initializing playback for one item using path %s', path) - result = Playback_Successful() - result.listitem = PKC_ListItem(path=path) - pickle_me(result) - else: - # kick off playback on second pass - conclude_playback(playqueue, pos) + # kick off playback on second pass + conclude_playback(playqueue, pos) def playback_init(plex_id, plex_type, playqueue): diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index d9a6414d..ccdca94e 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -28,7 +28,7 @@ class Playback_Starter(Thread): if mode == 'play': playback.playback_triage(plex_id=params.get('plex_id'), plex_type=params.get('plex_type'), - path=item) + path=params.get('path')) elif mode == 'plex_node': playback.process_indirect(params['key'], params['offset']) elif mode == 'context_menu': diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index 07ed82ba..76f1d23b 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -138,8 +138,6 @@ class Playlist_Item(object): offset = None [int] the item's view offset UPON START in Plex time part = 0 [int] part number if Plex video consists of mult. parts force_transcode [bool] defaults to False - playback_init [bool] Hack to use setResolvedUrl twice (and thus only - "correctly") if playback_init is set to True """ def __init__(self): self.id = None @@ -158,7 +156,6 @@ class Playlist_Item(object): # If Plex video consists of several parts; part number self.part = 0 self.force_transcode = False - self.playback_init = False def __repr__(self): """