Fix Kodi always playing the same file version of a video
This commit is contained in:
parent
65f04ddefc
commit
ccb95a0169
2 changed files with 4 additions and 5 deletions
|
@ -142,7 +142,7 @@ class ContextMenu(object):
|
||||||
v.KODI_PLAYLIST_TYPE_FROM_KODI_TYPE[self.kodi_type])
|
v.KODI_PLAYLIST_TYPE_FROM_KODI_TYPE[self.kodi_type])
|
||||||
playqueue.clear()
|
playqueue.clear()
|
||||||
app.PLAYSTATE.context_menu_play = True
|
app.PLAYSTATE.context_menu_play = True
|
||||||
handle = self.api.path(force_first_media=False, force_addon=True)
|
handle = self.api.path(force_addon=True)
|
||||||
handle = 'RunPlugin(%s)' % handle
|
handle = 'RunPlugin(%s)' % handle
|
||||||
xbmc.executebuiltin(handle.encode('utf-8'))
|
xbmc.executebuiltin(handle.encode('utf-8'))
|
||||||
|
|
||||||
|
|
|
@ -176,10 +176,9 @@ def _playback_init(plex_id, plex_type, playqueue, pos):
|
||||||
if (xbmc.getCondVisibility('Window.IsVisible(Home.xml)') and
|
if (xbmc.getCondVisibility('Window.IsVisible(Home.xml)') and
|
||||||
plex_type in v.PLEX_VIDEOTYPES and
|
plex_type in v.PLEX_VIDEOTYPES and
|
||||||
playqueue.kodi_pl.size() > 1):
|
playqueue.kodi_pl.size() > 1):
|
||||||
LOG.debug('Detected widget playback for videos')
|
|
||||||
# playqueue.kodi_pl.size() could return more than one - since playback
|
# playqueue.kodi_pl.size() could return more than one - since playback
|
||||||
# was initiated from the audio queue!
|
# was initiated from the audio queue!
|
||||||
pass
|
LOG.debug('Detected widget playback for videos')
|
||||||
elif playqueue.kodi_pl.size() > 1:
|
elif playqueue.kodi_pl.size() > 1:
|
||||||
# Special case - we already got a filled Kodi playqueue
|
# Special case - we already got a filled Kodi playqueue
|
||||||
try:
|
try:
|
||||||
|
@ -328,7 +327,7 @@ def _prep_playlist_stack(xml):
|
||||||
# Need to redirect again to PKC to conclude playback
|
# Need to redirect again to PKC to conclude playback
|
||||||
path = api.path()
|
path = api.path()
|
||||||
listitem = api.create_listitem()
|
listitem = api.create_listitem()
|
||||||
listitem.setPath(utils.try_encode(path))
|
listitem.setPath(path.encode('utf-8'))
|
||||||
else:
|
else:
|
||||||
# Will add directly via the Kodi DB
|
# Will add directly via the Kodi DB
|
||||||
path = None
|
path = None
|
||||||
|
@ -409,7 +408,7 @@ def _conclude_playback(playqueue, pos):
|
||||||
LOG.info('Did not get a playurl, aborting playback silently')
|
LOG.info('Did not get a playurl, aborting playback silently')
|
||||||
_ensure_resolve(abort=True)
|
_ensure_resolve(abort=True)
|
||||||
return
|
return
|
||||||
listitem.setPath(utils.try_encode(playurl))
|
listitem.setPath(playurl.encode('utf-8'))
|
||||||
if item.playmethod == 'DirectStream':
|
if item.playmethod == 'DirectStream':
|
||||||
listitem.setSubtitles(api.cache_external_subs())
|
listitem.setSubtitles(api.cache_external_subs())
|
||||||
elif item.playmethod == 'Transcode':
|
elif item.playmethod == 'Transcode':
|
||||||
|
|
Loading…
Reference in a new issue