1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2025-02-05 14:12:38 -06:00
random/fix-flac-date.sh

19 lines
442 B
Bash
Raw Permalink Normal View History

2025-01-20 16:41:42 -06:00
#!/usr/bin/env bash
# This script changes the DATE of a flac to be the
# one passed as the first argument.
# The name of the file should be passed as the second argument.
DATE=$1
FILE="$2"
[ -z "$DATE" ] && echo "Please provide a date" && exit -1
! [ -f "$FILE" ] && echo "Please provide a valid file" && exit -2
metaflac --remove-tag=YEAR "$FILE"
metaflac --remove-tag=DATE "$FILE"
metaflac --set-tag="DATE=$DATE" "$FILE"
echo "Done!"