mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 18:56:15 +00:00
Fixed playback time selection for forced transcodes
This commit is contained in:
parent
6f00779d73
commit
d8a7e43070
1 changed files with 6 additions and 6 deletions
|
@ -86,23 +86,22 @@ class Actions(object):
|
||||||
Detect the seektime for video type content.
|
Detect the seektime for video type content.
|
||||||
Verify the default video action set in Kodi for accurate resume behavior.
|
Verify the default video action set in Kodi for accurate resume behavior.
|
||||||
'''
|
'''
|
||||||
seektime = None
|
|
||||||
|
|
||||||
if item['MediaType'] in ('Video', 'Audio'):
|
if item['MediaType'] in ('Video', 'Audio'):
|
||||||
resume = item['UserData'].get('PlaybackPositionTicks')
|
resume = item['UserData'].get('PlaybackPositionTicks')
|
||||||
|
|
||||||
if resume and transcode and not seektime:
|
if resume and transcode:
|
||||||
choice = self.resume_dialog(api.API(item, self.server).adjust_resume((resume or 0) / 10000000.0))
|
choice = self.resume_dialog(api.API(item, self.server).adjust_resume((resume or 0) / 10000000.0))
|
||||||
|
|
||||||
if choice is None:
|
if choice is None:
|
||||||
raise Exception("User backed out of resume dialog.")
|
raise Exception("User backed out of resume dialog.")
|
||||||
|
|
||||||
seektime = False if not choice else True
|
item["resumePlayback"] = False if not choice else True
|
||||||
|
|
||||||
if settings('enableCinema.bool') and not seektime:
|
if settings('enableCinema.bool') and not item["resumePlayback"]:
|
||||||
self._set_intros(item)
|
self._set_intros(item)
|
||||||
|
|
||||||
self.set_listitem(item, listitem, db_id, seektime)
|
self.set_listitem(item, listitem, db_id, None)
|
||||||
playutils.set_properties(item, item['PlaybackInfo']['Method'], self.server_id)
|
playutils.set_properties(item, item['PlaybackInfo']['Method'], self.server_id)
|
||||||
self.stack.append([item['PlaybackInfo']['Path'], listitem])
|
self.stack.append([item['PlaybackInfo']['Path'], listitem])
|
||||||
|
|
||||||
|
@ -452,6 +451,7 @@ class Actions(object):
|
||||||
listitem.setProperty('StartPercent', str(((obj['Resume'] / obj['Runtime']) * 100) - 0.40))
|
listitem.setProperty('StartPercent', str(((obj['Resume'] / obj['Runtime']) * 100) - 0.40))
|
||||||
else:
|
else:
|
||||||
listitem.setProperty('resumetime', '0')
|
listitem.setProperty('resumetime', '0')
|
||||||
|
listitem.setProperty('StartPercent', '0')
|
||||||
|
|
||||||
for track in obj['Streams']['video']:
|
for track in obj['Streams']['video']:
|
||||||
listitem.addStreamInfo('video', {
|
listitem.addStreamInfo('video', {
|
||||||
|
|
Loading…
Reference in a new issue