You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scripts/detect_missing_fonts.sh

30 lines
691 B

#!/bin/bash
# Function to check if the file contains SSA/ASS subtitles
contains_ssa_ass() {
local file="$1"
if mkvmerge -i "$file" | grep -iq "SubStationAlpha"; then
return 0 # Found SSA/ASS subtitles
else
return 1 # No SSA/ASS subtitles
fi
}
# Function to check if the file has attachments
check_attachments() {
local file="$1"
if ! mkvmerge -i "$file" | grep -q "Attachment"; then
echo "$file"
fi
}
export -f contains_ssa_ass
export -f check_attachments
# Find all .mkv files and process them
find . -type f -name "*.mkv" | while read -r file; do
if contains_ssa_ass "$file"; then
check_attachments "$file"
fi
done