From 4502f400c7aadc6a0ddc6425382c7d08ab90cdff Mon Sep 17 00:00:00 2001 From: Uriziel Date: Mon, 24 Dec 2012 19:57:08 +0100 Subject: [PATCH] Seek and offset regex are less greedy now --- syncplay/ui/consoleUI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/ui/consoleUI.py b/syncplay/ui/consoleUI.py index 2906f35..57fd9e1 100644 --- a/syncplay/ui/consoleUI.py +++ b/syncplay/ui/consoleUI.py @@ -59,8 +59,8 @@ class ConsoleUI(threading.Thread): return None def _tryAdvancedCommands(self, data): - o = re.match(r"^(?:o|offset)\ ([+-])?\ ?(.+)$", data) - s = re.match(r"^(?:s|seek)?\ ?([+-])?\ ?(.+)$", data) #careful! s will match o as well + o = re.match(r"^(?:o|offset)\ ([+-])?\ ?(\d+[:\.]?)+$", data) + s = re.match(r"^(?:s|seek)?\ ?([+-])?\ ?(\d+[:\.]?)+$", data) #careful! s will match o as well if(o): sign = self._extractRegexSign(o) t = utils.parseTime(o.group(2))