Fix playback resuming potentially too often
This commit is contained in:
parent
524466360f
commit
d8555ee0cc
1 changed files with 13 additions and 10 deletions
|
@ -412,8 +412,8 @@ class SpecialMonitor(Thread):
|
||||||
# "Start from beginning", "Play from beginning"
|
# "Start from beginning", "Play from beginning"
|
||||||
strings = (getLocalizedString(12021), getLocalizedString(12023))
|
strings = (getLocalizedString(12021), getLocalizedString(12023))
|
||||||
while not self.stopped():
|
while not self.stopped():
|
||||||
if (getCondVisibility('Window.IsVisible(DialogContextMenu.xml)') and
|
if getCondVisibility('Window.IsVisible(DialogContextMenu.xml)'):
|
||||||
getInfoLabel('Control.GetLabel(1002)') in strings):
|
if getInfoLabel('Control.GetLabel(1002)') in strings:
|
||||||
# Remember that the item IS indeed resumable
|
# Remember that the item IS indeed resumable
|
||||||
control = int(Window(10106).getFocusId())
|
control = int(Window(10106).getFocusId())
|
||||||
if control == 1002:
|
if control == 1002:
|
||||||
|
@ -424,5 +424,8 @@ class SpecialMonitor(Thread):
|
||||||
else:
|
else:
|
||||||
# User chose something else from the context menu
|
# User chose something else from the context menu
|
||||||
state.RESUME_PLAYBACK = False
|
state.RESUME_PLAYBACK = False
|
||||||
|
else:
|
||||||
|
# Different context menu is displayed
|
||||||
|
state.RESUME_PLAYBACK = False
|
||||||
sleep(200)
|
sleep(200)
|
||||||
LOG.info("#====---- Special Monitor Stopped ----====#")
|
LOG.info("#====---- Special Monitor Stopped ----====#")
|
||||||
|
|
Loading…
Reference in a new issue