change local file name prefix to ignore from 000. to 0aA__
Stefan Schuermans

Stefan Schuermans commited on 2014-05-04 09:21:25
Showing 1 changed files, with 4 additions and 4 deletions.

... ...
@@ -32,7 +32,7 @@ class Synchronizer:
32 32
     self.speed_change     = 0.05  # change of MPlayer speed for catching up
33 33
     # create static objects
34 34
     self.re_mplayer_pos = re.compile(r"[AV]: *([0-9]+.[0-9]+) *\([0-9:.]*\) of .*")
35
-    self.re_num_prefix = re.compile(r"[0-9]\+\.(.*)$")
35
+    self.re_ignore_prefix = re.compile(r"[0-9a-zA-Z_]+__(.*)")
36 36
     # create member variables
37 37
     self.mplayer = None
38 38
     self.mplayer_buf_stdout = ""
... ...
@@ -286,9 +286,9 @@ class Synchronizer:
286 286
     file_name = os.path.splitext(file_name)[0]
287 287
     if file_name == posy_name:
288 288
       return True
289
-    # remove number prefix and check
290
-    m_num_prefix = self.re_num_prefix.match(file_name)
291
-    if m_num_prefix and m_num_prefix.group(1) == posy_name:
289
+    # remove ignore prefix and check
290
+    m_ignore_prefix = self.re_ignore_prefix.match(file_name)
291
+    if m_ignore_prefix and m_ignore_prefix.group(1) == posy_name:
292 292
       return True
293 293
     # not matching
294 294
     return False
295 295