1.0.22 - bug fix for language check process

master
RandomNinjaAtk 2 years ago committed by GitHub
parent e7c7f65ee1
commit 7ddcb24ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
export LANG=C.UTF-8 export LANG=C.UTF-8
TITLESHORT="VPP" TITLESHORT="VPP"
scriptVersion=1.0.21 scriptVersion=1.0.22
set -e set -e
set -o pipefail set -o pipefail
@ -80,9 +80,7 @@ function Main {
extension="${fileName##*.}" extension="${fileName##*.}"
log "$count of $fileCount :: Processing $fileName" log "$count of $fileCount :: Processing $fileName"
videoData=$(ffprobe -v quiet -print_format json -show_streams "$file") videoData=$(ffprobe -v quiet -print_format json -show_streams "$file")
videoAudioLanguages=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"audio\") | .tags.language")
videoAudioTracksCount=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"audio\") | .index" | wc -l) videoAudioTracksCount=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"audio\") | .index" | wc -l)
videoSubtitleLanguages=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"subtitle\") | .tags.language")
videoSubtitleTracksCount=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"subtitle\") | .index" | wc -l) videoSubtitleTracksCount=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"subtitle\") | .index" | wc -l)
log "$count of $fileCount :: $videoAudioTracksCount Audio Tracks Found!" log "$count of $fileCount :: $videoAudioTracksCount Audio Tracks Found!"
@ -112,6 +110,9 @@ function Main {
fi fi
fi fi
videoData=$(ffprobe -v quiet -print_format json -show_streams "$file")
videoAudioLanguages=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"audio\") | .tags.language")
videoSubtitleLanguages=$(echo "${videoData}" | jq -r ".streams[] | select(.codec_type==\"subtitle\") | .tags.language")
# Language Check # Language Check
log "$count of $fileCount :: Checking for preferred languages \"$VIDEO_LANG\"" log "$count of $fileCount :: Checking for preferred languages \"$VIDEO_LANG\""

Loading…
Cancel
Save