Slower Repeat, and Repeat fix for timing

This commit is contained in:
Ruben van de Ven 2019-11-11 11:51:47 +01:00
parent 60bfbf5428
commit 10f856a439

View file

@ -102,7 +102,7 @@ class Message(object):
msg.isStart = data['beginning'] if 'beginning' in data else False msg.isStart = data['beginning'] if 'beginning' in data else False
msg.isStrandStart = data['start'] if 'start' in data else False msg.isStrandStart = data['start'] if 'start' in data else False
msg.chapterStart = bool(data['chapterStart']) if 'chapterStart' in data else False msg.chapterStart = bool(data['chapterStart']) if 'chapterStart' in data else False
msg.afterrunTime = data['afterrun'] if 'afterrun' in data else 0. msg.afterrunTime = data['afterrun'] if 'afterrun' in data else 0. # TODO: investigate deprecation?
msg.color = data['color'] if 'color' in data else None msg.color = data['color'] if 'color' in data else None
if 'audio' in data and data['audio'] is not None: if 'audio' in data and data['audio'] is not None:
msg.audioFile = data['audio']['file'] msg.audioFile = data['audio']['file']
@ -980,7 +980,7 @@ class Diversion(object):
# TODO: how to handle this now we sometimes use different timings. # TODO: how to handle this now we sometimes use different timings.
# Perhaps set isFinished when matching condition. # Perhaps set isFinished when matching condition.
if story.currentReply is None or story.currentReply.getTimeSinceLastUtterance() > 1: if story.currentReply is None or story.currentReply.getTimeSinceLastUtterance() < 1.8:
return return
r = self.regex.search(story.currentReply.getText()) r = self.regex.search(story.currentReply.getText())