diff --git a/docker/worker/ripping.py b/docker/worker/ripping.py index 1d760b9..c8fe353 100644 --- a/docker/worker/ripping.py +++ b/docker/worker/ripping.py @@ -35,8 +35,13 @@ def check_cdparanoia_installed() -> bool: def get_progress_from_line(line: str) -> int: - """Extrahiert Fortschritt in Prozent aus HandBrake-Ausgabe.""" - match = re.search(r'(\d+\.\d+)%', line) + """Extrahiert Fortschritt in Prozent aus HandBrake-Ausgabe. + + Testfund 22.07.: echtes HandBrake schreibt „45.50 %" MIT Leerzeichen vor + dem Prozentzeichen — die alte Regex ohne \\s* hat NIE einen Fortschritt + aus echter Ausgabe geparst. + """ + match = re.search(r'(\d+\.\d+)\s*%', line) if match: return int(float(match.group(1))) return 0