Merge branch 'master' of https://github.com/marcelveldt/plugin.video.mb3sync
This commit is contained in:
commit
b1385b6cc7
2 changed files with 11 additions and 4 deletions
|
@ -14,6 +14,7 @@ from DownloadUtils import DownloadUtils
|
||||||
downloadUtils = DownloadUtils()
|
downloadUtils = DownloadUtils()
|
||||||
from PlayUtils import PlayUtils
|
from PlayUtils import PlayUtils
|
||||||
from ReadKodiDB import ReadKodiDB
|
from ReadKodiDB import ReadKodiDB
|
||||||
|
from ReadEmbyDB import ReadEmbyDB
|
||||||
from API import API
|
from API import API
|
||||||
import Utils as utils
|
import Utils as utils
|
||||||
import os
|
import os
|
||||||
|
@ -50,11 +51,17 @@ class PlaybackUtils():
|
||||||
resume_result = 0
|
resume_result = 0
|
||||||
seekTime = 0
|
seekTime = 0
|
||||||
|
|
||||||
#get the resume point from Kodi DB
|
#get the resume point from Kodi DB for a Movie
|
||||||
kodiItem = ReadKodiDB().getKodiMovie(id)
|
kodiItem = ReadKodiDB().getKodiMovie(id)
|
||||||
if kodiItem != None:
|
if kodiItem != None:
|
||||||
seekTime = int(round(kodiItem['resume'].get("position")))
|
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)
|
playurl = PlayUtils().getPlayUrl(server, id, result)
|
||||||
|
|
||||||
isStrmFile = False
|
isStrmFile = False
|
||||||
|
|
|
@ -306,8 +306,8 @@ class Player( xbmc.Player ):
|
||||||
count = 0
|
count = 0
|
||||||
while xbmc.Player().getTime() < (seekToTime - 5) and count < 11: # only try 10 times
|
while xbmc.Player().getTime() < (seekToTime - 5) and count < 11: # only try 10 times
|
||||||
count = count + 1
|
count = count + 1
|
||||||
xbmc.Player().pause
|
#xbmc.Player().pause()
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
xbmc.Player().seekTime(seekToTime)
|
xbmc.Player().seekTime(seekToTime)
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
xbmc.Player().play()
|
#xbmc.Player().play()
|
||||||
|
|
Loading…
Reference in a new issue