From e754e83b6bc681736dc23c396a072ce713f4b695 Mon Sep 17 00:00:00 2001 From: upuv Date: Sat, 19 May 2018 23:35:11 +1000 Subject: [PATCH] Added big FAT metadata to DEBUG output. --- AAXtoMP3 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/AAXtoMP3 b/AAXtoMP3 index 8699484..a09b107 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -83,6 +83,16 @@ debug() { fi } +# debug dump contents of a file to STDOUT +debug_file() { + if [ $DEBUG == 1 ] ; then + echo "$(date "+%F %T%z") DEBUG" + echo "================================================================================" + cat "${1}" + echo "================================================================================" + fi +} + # log log() { echo "$(date "+%F %T%z") ${1}" @@ -96,6 +106,8 @@ save_metadata() { local media_file media_file="$1" ffprobe -i "$media_file" 2> "$metadata_file" + debug "Metadata file $metadata_file" + debug_file "$metadata_file" } get_metadata_value() {