From 0276f1162b0e9bc3d1045081973a99ffedb15545 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Sat, 2 Nov 2019 22:09:34 +0100 Subject: [PATCH] colorize paths on all systems --- ffplayout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffplayout.py b/ffplayout.py index 1e0aec5f..660da437 100755 --- a/ffplayout.py +++ b/ffplayout.py @@ -240,8 +240,8 @@ class CustomFormatter(logging.Formatter): def format_message(self, msg): if '"' in msg and '[' in msg: msg = re.sub('(".*?")', self.cyan + r'\1' + self.reset, msg) - elif '/' in msg: - msg = re.sub('("?/.*?)', self.magenta + r'\1', msg) + elif '/' in msg or '\\' in msg: + msg = re.sub(r'(["\w.:]+/|["\w.:]+\\.*?)', self.magenta + r'\1', msg) elif re.search(r'\d', msg): msg = re.sub( '([0-9.]+)', self.brightyellow + r'\1' + self.reset, msg)