better formating

This commit is contained in:
jb-alvarado 2021-02-10 15:22:36 +01:00
parent 74edbf628d
commit fcd460d61a

View File

@ -141,7 +141,6 @@ _playout = SimpleNamespace()
_init = SimpleNamespace(load=True) _init = SimpleNamespace(load=True)
_ff = SimpleNamespace(decoder=None, encoder=None) _ff = SimpleNamespace(decoder=None, encoder=None)
_current = SimpleNamespace(clip=None)
_global = SimpleNamespace(time_delta=0) _global = SimpleNamespace(time_delta=0)
@ -297,7 +296,7 @@ class CustomFormatter(logging.Formatter):
msg = re.sub(r'(\[encoder\])', self.reset + r'\1', msg) msg = re.sub(r'(\[encoder\])', self.reset + r'\1', msg)
elif '/' in msg or '\\' in msg: elif '/' in msg or '\\' in msg:
msg = re.sub( msg = re.sub(
r'(["\w.:/]+/|["\w.:]+\\.*?)', self.magenta + r'\1', msg) r'("?/[\w.:/]+|["\w.:]+\\.*?)', self.magenta + r'\1', msg)
elif re.search(r'\d', msg): elif re.search(r'\d', msg):
msg = re.sub( msg = re.sub(
'([0-9.:-]+)', self.yellow + r'\1' + self.reset, msg) '([0-9.:-]+)', self.yellow + r'\1' + self.reset, msg)
@ -879,7 +878,7 @@ def src_or_dummy(probe, src, dur, seek, out):
else: else:
return seek_in(seek) + ['-i', src] + set_length(dur, seek, out) return seek_in(seek) + ['-i', src] + set_length(dur, seek, out)
else: else:
messenger.error(f'Clip/URL not exist:\n{src}') messenger.error(f'Clip not exist:\n{src}')
return gen_dummy(out - seek) return gen_dummy(out - seek)