Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This script will find films with commentaries as defined by mediainfo. Only works if
- # there is an "commentary" entry in the audio description flags. This script searches
- # /Volumes/*/Movies/*/ for mediafiles. Paths must be named as such for it to work.
- # The script also outputs a dated log file to the Desktop with found files.
- # Set date format
- DATE=`date +%Y.%m.%d`
- # Find the media files and echoes to stdin and a txt file with the date appended.
- # Searches for .mkv, .mp4, .avi, and .m4v. Edit first line to add more extensions.
- for file in /Volumes/*/Movies/*/*.mkv /Volumes/*/Movies/*/*.mp4 /Volumes/*/Movies/*/*.avi /Volumes/*/Movies/*/*.m4v; do
- if mediainfo "$file" | grep -qi commentary; then
- echo ""$file" has a commentary track!"
- echo ""$file" has a commentary track!" >> ~/Desktop/films.with.commentaries.$DATE.txt
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement