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 = {}
|
self.played_info = {}
|
||||||
|
|
||||||
# Set by SpecialMonitor - did user choose to resume playback or start from the
|
# Set by SpecialMonitor - did user choose to resume playback or start
|
||||||
# beginning?
|
# from the beginning?
|
||||||
self.resume_playback = False
|
# 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?
|
# Was the playback initiated by the user using the Kodi context menu?
|
||||||
self.context_menu_play = False
|
self.context_menu_play = False
|
||||||
# Set by context menu - shall we force-transcode the next playing item?
|
# 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')
|
LOG = getLogger('PLEX.kodimonitor')
|
||||||
|
|
||||||
# "Start from beginning", "Play from beginning"
|
# "Start from beginning", "Play from beginning"
|
||||||
STRINGS = (utils.try_encode(utils.lang(12021)),
|
STRINGS = (utils.lang(12021).encode('utf-8'),
|
||||||
utils.try_encode(utils.lang(12023)))
|
utils.lang(12023).encode('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
class KodiMonitor(xbmc.Monitor):
|
class KodiMonitor(xbmc.Monitor):
|
||||||
|
@ -559,5 +559,5 @@ class ContextMonitor(backgroundthread.KillableThread):
|
||||||
app.PLAYSTATE.resume_playback = True if control == 1001 else False
|
app.PLAYSTATE.resume_playback = True if control == 1001 else False
|
||||||
else:
|
else:
|
||||||
# Different context menu is displayed
|
# Different context menu is displayed
|
||||||
app.PLAYSTATE.resume_playback = False
|
app.PLAYSTATE.resume_playback = None
|
||||||
xbmc.sleep(100)
|
xbmc.sleep(100)
|
||||||
|
|
|
@ -206,9 +206,8 @@ class PlayStrm(object):
|
||||||
Resume item if available. Returns bool or raise an PlayStrmException if
|
Resume item if available. Returns bool or raise an PlayStrmException if
|
||||||
resume was cancelled by user.
|
resume was cancelled by user.
|
||||||
'''
|
'''
|
||||||
seektime = utils.window('plex.resume')
|
seektime = app.PLAYSTATE.resume_playback
|
||||||
utils.window('plex.resume', clear=True)
|
app.PLAYSTATE.resume_playback = None
|
||||||
seektime = seektime == 'true' if seektime else None
|
|
||||||
auto_play = utils.window('plex.autoplay.bool')
|
auto_play = utils.window('plex.autoplay.bool')
|
||||||
if auto_play:
|
if auto_play:
|
||||||
seektime = False
|
seektime = False
|
||||||
|
|
|
@ -10,7 +10,7 @@ import xbmcaddon
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
|
|
||||||
LOG = getLogger('PLEX.resume')
|
LOG = getLogger('PLEX.windows.resume')
|
||||||
|
|
||||||
XML_PATH = (xbmcaddon.Addon('plugin.video.plexkodiconnect').getAddonInfo('path'),
|
XML_PATH = (xbmcaddon.Addon('plugin.video.plexkodiconnect').getAddonInfo('path'),
|
||||||
"default",
|
"default",
|
||||||
|
|
Loading…
Reference in a new issue