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

18 lines
442 B
Bash

#!/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!"