v1.02 - new AudioQualityMatch

master
RandomNinjaAtk 3 years ago committed by GitHub
parent bc130e5f2e
commit 6193c362cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
TITLESHORT="APP"
ScriptVersion="1.01"
ScriptVersion="1.02"
set -e
set -o pipefail
@ -34,11 +34,27 @@ Main () {
if [ "${ConversionFormat}" = FLAC ]; then
echo "Bitrate: lossless"
echo "Replaygain Tagging: ENABLED"
AudioFileExtension="flac"
elif [ "${ConversionFormat}" = ALAC ]; then
echo "Bitrate: lossless"
AudioFileExtension="m4a"
else
echo "Conversion Bitrate: ${ConversionBitrate}k"
if [ "${ConversionFormat}" = MP3 ]; then
AudioFileExtension="mp3"
elif [ "${ConversionFormat}" = AAC ]; then
AudioFileExtension="m4a"
elif [ "${ConversionFormat}" = OPUS ]; then
AudioFileExtension="opus"
fi
fi
if [ "$RequireAudioQualityMatch" = "true" ]; then
echo "Audio Quality Match Verification: ENABLED (.$AudioFileExtension)"
else
echo "Audio Quality Match Verification: DISABLED"
fi
if [ "${DetectNonSplitAlubms}" = TRUE ]; then
echo "Detect Non Split Alubms: ENABLED"
echo "Max File Size: $MaxFileSize"
@ -49,6 +65,20 @@ Main () {
echo "Processing: $1"
}
AudioQualityMatch () {
if [ "$RequireAudioQualityMatch" == "true" ]; then
if [ $(find "$1" -type f -iname "*.$AudioFileExtension" | wc -l) -gt 0 ]; then
echo "Verifying Audio Quality Match"
echo "Verifying Audio Quality Match: PASSED (.$AudioFileExtension)"
else
echo "Verifying Audio Quality Match"
echo "ERROR: Audio Qualty Check Failed, missing required file extention (.$AudioFileExtension)"
exit 1
fi
fi
}
clean () {
if [ $(find "$1" -type f -regex ".*/.*\.\(flac\|mp3\|m4a\|alac\|ogg\|opus\)" | wc -l) -gt 0 ]; then
@ -216,6 +246,8 @@ Main () {
fi
conversion "$1"
AudioQualityMatch "$1"
if [ "${ReplaygainTagging}" = TRUE ]; then
replaygain "$1"

Loading…
Cancel
Save