From 284983f529f1cb57051e721e5e9c2b07c7f88ebd Mon Sep 17 00:00:00 2001 From: im85288 Date: Wed, 25 Mar 2015 15:43:12 +0000 Subject: [PATCH 1/2] fix crash when seeking to play --- resources/lib/Player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/Player.py b/resources/lib/Player.py index 02d1f6e1..16c3ffe5 100644 --- a/resources/lib/Player.py +++ b/resources/lib/Player.py @@ -306,8 +306,8 @@ class Player( xbmc.Player ): count = 0 while xbmc.Player().getTime() < (seekToTime - 5) and count < 11: # only try 10 times count = count + 1 - xbmc.Player().pause + #xbmc.Player().pause() xbmc.sleep(100) xbmc.Player().seekTime(seekToTime) xbmc.sleep(100) - xbmc.Player().play() + #xbmc.Player().play() From 39a8a5262f74c16fef2457eba5eb6d58d09cffa5 Mon Sep 17 00:00:00 2001 From: im85288 Date: Wed, 25 Mar 2015 16:01:13 +0000 Subject: [PATCH 2/2] added resume point for episodes --- resources/lib/PlaybackUtils.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/lib/PlaybackUtils.py b/resources/lib/PlaybackUtils.py index 4b98c7a3..f5c126a2 100644 --- a/resources/lib/PlaybackUtils.py +++ b/resources/lib/PlaybackUtils.py @@ -14,6 +14,7 @@ from DownloadUtils import DownloadUtils downloadUtils = DownloadUtils() from PlayUtils import PlayUtils from ReadKodiDB import ReadKodiDB +from ReadEmbyDB import ReadEmbyDB from API import API import Utils as utils import os @@ -50,11 +51,17 @@ class PlaybackUtils(): resume_result = 0 seekTime = 0 - #get the resume point from Kodi DB + #get the resume point from Kodi DB for a Movie kodiItem = ReadKodiDB().getKodiMovie(id) if kodiItem != None: seekTime = int(round(kodiItem['resume'].get("position"))) - + else: + #get the resume point from Kodi DB for an episode + episodeItem = ReadEmbyDB().getItem(id) + kodiItem = ReadKodiDB().getKodiEpisodeByMbItem(id,episodeItem["SeriesId"]) + if kodiItem != None: + seekTime = int(round(kodiItem['resume'].get("position"))) + playurl = PlayUtils().getPlayUrl(server, id, result) isStrmFile = False