16 lines
391 B
Bash
Executable File
16 lines
391 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
library="$1"
|
|
|
|
for file in "$library"/*; do
|
|
[[ -f "$file" ]] || continue
|
|
|
|
comment=$(ffprobe -v quiet -show_entries format_tags=comment \
|
|
-of default=noprint_wrappers=1:nokey=1 "$file")
|
|
|
|
if echo "$comment" | grep -Eiq "(youtube\.com|youtu\.be)"; then
|
|
echo "$comment" | grep -Eo "https?://(www\.)?(youtube\.com|youtu\.be)[^ ]+"
|
|
fi
|
|
done
|
|
|