Advertisement
Guest User

Untitled

a guest
Feb 24th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # This script will find films with commentaries as defined by mediainfo. Only works if
  4. # there is an "commentary" entry in the audio description flags. This script searches
  5. # /Volumes/*/Movies/*/ for mediafiles. Paths must be named as such for it to work.
  6. # The script also outputs a dated log file to the Desktop with found files.
  7.  
  8. # Set date format
  9.  
  10. DATE=`date +%Y.%m.%d`
  11.  
  12. # Find the media files and echoes to stdin and a txt file with the date appended.
  13. # Searches for .mkv, .mp4, .avi, and .m4v. Edit first line to add more extensions.
  14.  
  15. for file in /Volumes/*/Movies/*/*.mkv /Volumes/*/Movies/*/*.mp4 /Volumes/*/Movies/*/*.avi /Volumes/*/Movies/*/*.m4v; do
  16. if mediainfo "$file" | grep -qi commentary; then
  17. echo ""$file" has a commentary track!"
  18. echo ""$file" has a commentary track!" >> ~/Desktop/films.with.commentaries.$DATE.txt
  19. fi
  20. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement