From 49360add2d26876fee84a71b4a4c29d4c11e9a93 Mon Sep 17 00:00:00 2001 From: Tamara Schmitz Date: Thu, 3 Aug 2023 04:31:02 +0200 Subject: [PATCH] music: coverart extraction. check ffmpeg return --- music/musicbatchconverter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/music/musicbatchconverter.py b/music/musicbatchconverter.py index 1c8c95a..f7309af 100755 --- a/music/musicbatchconverter.py +++ b/music/musicbatchconverter.py @@ -285,8 +285,8 @@ def extract_coverart(in_filepath: Path, tempdir: Path) -> Path: cmd.extend(["-map", "0:v", "-q:v", "5", cpath]) if not args.vff: cmd.extend([ '-loglevel', 'error' ]) - exec_cmd(cmd) - return cpath + if exec_cmd(cmd).returncode == 0: + return cpath return None