Rewire video resume info
This commit is contained in:
parent
20bffc1b41
commit
12befecc4a
4 changed files with 10 additions and 10 deletions
|
@ -53,9 +53,10 @@ class PlayState(object):
|
|||
}
|
||||
self.played_info = {}
|
||||
|
||||
# Set by SpecialMonitor - did user choose to resume playback or start from the
|
||||
# beginning?
|
||||
self.resume_playback = False
|
||||
# Set by SpecialMonitor - did user choose to resume playback or start
|
||||
# from the beginning?
|
||||
# Do set to None if NO resume dialog is displayed! True/False otherwise
|
||||
self.resume_playback = None
|
||||
# Was the playback initiated by the user using the Kodi context menu?
|
||||
self.context_menu_play = False
|
||||
# Set by context menu - shall we force-transcode the next playing item?
|
||||
|
|
|
@ -21,8 +21,8 @@ from . import backgroundthread, app, variables as v
|
|||
LOG = getLogger('PLEX.kodimonitor')
|
||||
|
||||
# "Start from beginning", "Play from beginning"
|
||||
STRINGS = (utils.try_encode(utils.lang(12021)),
|
||||
utils.try_encode(utils.lang(12023)))
|
||||
STRINGS = (utils.lang(12021).encode('utf-8'),
|
||||
utils.lang(12023).encode('utf-8'))
|
||||
|
||||
|
||||
class KodiMonitor(xbmc.Monitor):
|
||||
|
@ -559,5 +559,5 @@ class ContextMonitor(backgroundthread.KillableThread):
|
|||
app.PLAYSTATE.resume_playback = True if control == 1001 else False
|
||||
else:
|
||||
# Different context menu is displayed
|
||||
app.PLAYSTATE.resume_playback = False
|
||||
app.PLAYSTATE.resume_playback = None
|
||||
xbmc.sleep(100)
|
||||
|
|
|
@ -206,9 +206,8 @@ class PlayStrm(object):
|
|||
Resume item if available. Returns bool or raise an PlayStrmException if
|
||||
resume was cancelled by user.
|
||||
'''
|
||||
seektime = utils.window('plex.resume')
|
||||
utils.window('plex.resume', clear=True)
|
||||
seektime = seektime == 'true' if seektime else None
|
||||
seektime = app.PLAYSTATE.resume_playback
|
||||
app.PLAYSTATE.resume_playback = None
|
||||
auto_play = utils.window('plex.autoplay.bool')
|
||||
if auto_play:
|
||||
seektime = False
|
||||
|
|
|
@ -10,7 +10,7 @@ import xbmcaddon
|
|||
from logging import getLogger
|
||||
|
||||
|
||||
LOG = getLogger('PLEX.resume')
|
||||
LOG = getLogger('PLEX.windows.resume')
|
||||
|
||||
XML_PATH = (xbmcaddon.Addon('plugin.video.plexkodiconnect').getAddonInfo('path'),
|
||||
"default",
|
||||
|
|
Loading…
Reference in a new issue