Last active
February 28, 2020 04:57
-
-
Save rwenz3l/38df928b65bc3d99cb2f to your computer and use it in GitHub Desktop.
Sets the MKV Title Attribute to the filename
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare mkvpropedit="/usr/bin/mkvpropedit" | |
declare movieDir="/path/to/movies" | |
function mkvTitleEdit { | |
filename=$(basename "${1}") | |
filename="${filename%.*}" | |
echo mkvpropedit --set title "${filename}" "${1}" | |
} | |
export -f mkvTitleEdit | |
find ${movieDir} -type f -name "*.mkv" -exec bash -c 'mkvTitleEdit "$@"' bash /{} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment