From c2ee5137edf2a71c346056acb8d6e3fa433cf733 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 30 Aug 2026 10:39:36 +0200 Subject: [PATCH] move check mp3 programs on top --- libs/mp3.sh | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/libs/mp3.sh b/libs/mp3.sh index 5d51b1f..8c6c809 100644 --- a/libs/mp3.sh +++ b/libs/mp3.sh @@ -1,5 +1,21 @@ #!/bin/bash +check_mp3_programs() +{ + command -v flac > /dev/null \ + || errlog "command flac not found" \ + || return $? + command -v lame > /dev/null \ + || errlog "command lame not found" \ + || return $? + command -v eyeD3 > /dev/null \ + || errlog "command eyeD3 not found" \ + || return $? + command -v parallel > /dev/null \ + || errlog "command parallel not found" \ + || return $? +} + read_flac_to_mp3_tags() { local inputfile="$1" @@ -95,26 +111,9 @@ convert_flac_to_mp3() flac_to_mp3 {} } -check_mp3_programs() -{ - command -v flac > /dev/null \ - || errlog "command flac not found" \ - || return $? - command -v lame > /dev/null \ - || errlog "command lame not found" \ - || return $? - command -v eyeD3 > /dev/null \ - || errlog "command eyeD3 not found" \ - || return $? - command -v parallel > /dev/null \ - || errlog "command parallel not found" \ - || return $? -} - execute() { local workdir="$1" - convert_flac_to_mp3 "$workdir" || return $? } -- 2.47.3