extract only some tags, not all

This commit is contained in:
fabh2o 2021-02-05 10:37:23 +01:00
parent 8a82d9f661
commit 7be5ee8749

View File

@ -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"