mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-12 21:26:10 +00:00
Fix resume for widgets
This commit is contained in:
parent
43be19e650
commit
900b1cc76a
1 changed files with 3 additions and 5 deletions
|
@ -74,7 +74,7 @@ class PlaybackUtils(object):
|
||||||
log.info("Clear the playlist.")
|
log.info("Clear the playlist.")
|
||||||
self.playlist.clear()
|
self.playlist.clear()
|
||||||
|
|
||||||
self.set_playlist(play_url, item_id, listitem, seektime, dbid, force_transcode)
|
self.set_playlist(play_url, item_id, listitem, seektime, dbid)
|
||||||
|
|
||||||
##### SETUP PLAYBACK
|
##### SETUP PLAYBACK
|
||||||
|
|
||||||
|
@ -99,6 +99,7 @@ class PlaybackUtils(object):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
log.info("Playback activated via the context menu or widgets.")
|
log.info("Playback activated via the context menu or widgets.")
|
||||||
force_play = True
|
force_play = True
|
||||||
|
listitem.setProperty('StartOffset', str(seektime))
|
||||||
|
|
||||||
for stack in self.stack:
|
for stack in self.stack:
|
||||||
self.playlist.add(url=stack[0], listitem=stack[1], index=index)
|
self.playlist.add(url=stack[0], listitem=stack[1], index=index)
|
||||||
|
@ -107,7 +108,7 @@ class PlaybackUtils(object):
|
||||||
if force_play:
|
if force_play:
|
||||||
xbmc.Player().play(self.playlist)
|
xbmc.Player().play(self.playlist)
|
||||||
|
|
||||||
def set_playlist(self, play_url, item_id, listitem, seektime=None, db_id=None, force_transcode=False):
|
def set_playlist(self, play_url, item_id, listitem, seektime=None, db_id=None):
|
||||||
|
|
||||||
##### CHECK FOR INTROS
|
##### CHECK FOR INTROS
|
||||||
|
|
||||||
|
@ -120,9 +121,6 @@ class PlaybackUtils(object):
|
||||||
self.set_listitem(listitem, db_id)
|
self.set_listitem(listitem, db_id)
|
||||||
self.stack.append([play_url, listitem])
|
self.stack.append([play_url, listitem])
|
||||||
|
|
||||||
if force_transcode and seektime:
|
|
||||||
listitem.setProperty('StartOffset', str(seektime))
|
|
||||||
|
|
||||||
##### ADD ADDITIONAL PARTS
|
##### ADD ADDITIONAL PARTS
|
||||||
|
|
||||||
if self.item.get('PartCount'):
|
if self.item.get('PartCount'):
|
||||||
|
|
Loading…
Reference in a new issue