Fix video resuming from old resume point

This commit is contained in:
croneter 2018-12-25 18:13:50 +01:00
parent 4fb4643ac0
commit 6076da724b

View file

@ -409,8 +409,9 @@ def _conclude_playback(playqueue, pos):
if app.PLAYSTATE.resume_playback is True: if app.PLAYSTATE.resume_playback is True:
app.PLAYSTATE.resume_playback = False app.PLAYSTATE.resume_playback = False
if (item.offset is None and if item.plex_type not in (v.PLEX_TYPE_SONG, v.PLEX_TYPE_CLIP):
item.plex_type not in (v.PLEX_TYPE_SONG, v.PLEX_TYPE_CLIP)): # Do NOT use item.offset directly but get it from the DB
# (user might have initiated same video twice)
with PlexDB() as plexdb: with PlexDB() as plexdb:
db_item = plexdb.item_by_id(item.plex_id, item.plex_type) db_item = plexdb.item_by_id(item.plex_id, item.plex_type)
file_id = db_item['kodi_fileid'] if db_item else None file_id = db_item['kodi_fileid'] if db_item else None