mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
added support for intros
This commit is contained in:
parent
23e039fd43
commit
8f8f39bb75
1 changed files with 12 additions and 1 deletions
|
@ -68,6 +68,17 @@ class PlaybackUtils():
|
||||||
reasonableTicks = int(userData.get("PlaybackPositionTicks")) / 1000
|
reasonableTicks = int(userData.get("PlaybackPositionTicks")) / 1000
|
||||||
seekTime = reasonableTicks / 10000
|
seekTime = reasonableTicks / 10000
|
||||||
|
|
||||||
|
# check for any intros - if we have any play them when the movie/show is not being resumed
|
||||||
|
url = "{server}/mediabrowser/Users/{UserId}/Items/%s/Intros?format=json&ImageTypeLimit=1&Fields=Etag" % id
|
||||||
|
intros = self.downloadUtils.downloadUrl(url)
|
||||||
|
if(intros != "" and intros.get("Items") != None and seekTime == 0):
|
||||||
|
introsId = []
|
||||||
|
for intro in intros[u'Items']:
|
||||||
|
introid = intro[u'Id']
|
||||||
|
introsId.append(introid)
|
||||||
|
introsId.append(id)
|
||||||
|
return self.PLAYAllItems(introsId, startPositionTicks=None)
|
||||||
|
|
||||||
playurl = PlayUtils().getPlayUrl(server, id, result)
|
playurl = PlayUtils().getPlayUrl(server, id, result)
|
||||||
if playurl == False:
|
if playurl == False:
|
||||||
#xbmcgui.Dialog().ok('Warning', 'Failed to launch playback.')
|
#xbmcgui.Dialog().ok('Warning', 'Failed to launch playback.')
|
||||||
|
|
Loading…
Reference in a new issue