From 7be5ee8749a3c523657d0a9cad2ab725f4354839 Mon Sep 17 00:00:00 2001 From: fabh2o Date: Fri, 5 Feb 2021 10:37:23 +0100 Subject: [PATCH 1/4] extract only some tags, not all --- AAXtoMP3 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/AAXtoMP3 b/AAXtoMP3 index 25ca161..8bd6eda 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -327,8 +327,17 @@ save_metadata() { media_file="$1" ffprobe -i "$media_file" 2> "$metadata_file" if [[ $(type -P mediainfo) ]]; then + echo "Mediainfo data START" >> "$metadata_file" # Mediainfo output is structured like ffprobe, so we append it to the metadata file and then parse it with get_metadata_value() - mediainfo "$media_file" >> "$metadata_file" + # mediainfo "$media_file" >> "$metadata_file" + # Or we only get the data we are intrested in: + # Description + echo "Track_More :" "$(mediainfo --Inform="General;%Track_More%" "$media_file")" >> "$metadata_file" + # Narrator + echo "nrt :" "$(mediainfo --Inform="General;%nrt%" "$media_file")" >> "$metadata_file" + # Publisher + echo "pub :" "$(mediainfo --Inform="General;%pub%" "$media_file")" >> "$metadata_file" + echo "Mediainfo data END" >> "$metadata_file" fi debug "Metadata file $metadata_file" debug_file "$metadata_file" From 712b69d8ec8b2711968023af3a6233552e3a9d66 Mon Sep 17 00:00:00 2001 From: fabh2o Date: Fri, 5 Feb 2021 10:39:00 +0100 Subject: [PATCH 2/4] get metadata value --- AAXtoMP3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AAXtoMP3 b/AAXtoMP3 index 8bd6eda..95c93cf 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -397,9 +397,11 @@ do if [[ $(type -P mediainfo) ]]; then narrator="$(get_metadata_value nrt)" description="$(get_metadata_value Track_More)" + publisher="$(get_metadata_value pub)" else narrator="" description="" + publisher="" fi if [[ "${noclobber}" = "1" ]] && [[ -d "${output_directory}" ]]; then From 4870dc334a80d026775ee158e5f3cf943f64b30c Mon Sep 17 00:00:00 2001 From: fabh2o Date: Fri, 5 Feb 2021 10:42:14 +0100 Subject: [PATCH 3/4] use publisher tag --- AAXtoMP3 | 1 + 1 file changed, 1 insertion(+) diff --git a/AAXtoMP3 b/AAXtoMP3 index 95c93cf..6c9649b 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -443,6 +443,7 @@ do -metadata copyright="${copyright}" \ -metadata description="${description}" \ -metadata composer="${narrator}" \ + -metadata publisher="${publisher}" \ -f ${container} \ "${output_file}" From 3fb377a107a082a747c7de79f1b19a7df4c7cc4e Mon Sep 17 00:00:00 2001 From: fabh2o Date: Fri, 5 Feb 2021 16:13:06 +0100 Subject: [PATCH 4/4] debug var publisher --- AAXtoMP3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AAXtoMP3 b/AAXtoMP3 index 6c9649b..29223d1 100755 --- a/AAXtoMP3 +++ b/AAXtoMP3 @@ -418,7 +418,7 @@ do # Big long DEBUG output. Fully describes the settings used for transcoding. # Note this is a long debug command. It's not critical to operation. It's purely for people debugging # and coders wanting to extend the script. - debug_vars "Book and Variable values" title auth_code mode aax_file container codec bitrate artist album_artist album album_date genre copyright narrator description output_file metadata_file working_directory + debug_vars "Book and Variable values" title auth_code mode aax_file container codec bitrate artist album_artist album album_date genre copyright narrator description publisher output_file metadata_file working_directory # ----- if [ "${continue}" == "0" ]; then