From: Bastian Dehn Date: Sun, 30 Aug 2026 08:39:36 +0000 (+0200) Subject: move check mp3 programs on top X-Git-Tag: v1.0.0^2~28 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=c2ee5137edf2a71c346056acb8d6e3fa433cf733;p=albentohandy.git move check mp3 programs on top --- 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 $? }