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

new: Added script fix-flac-date

This commit is contained in:
Sayantan Santra 2025-01-20 16:41:42 -06:00
parent 407684c082
commit a8edbc7d3c
Signed by: SinTan1729
GPG key ID: 0538DD402EA50898
2 changed files with 19 additions and 1 deletions

View file

@ -1,4 +1,4 @@
![Number of scripts](https://img.shields.io/badge/number_of_scripts-46-blue) ![Number of scripts](https://img.shields.io/badge/number_of_scripts-47-blue)
# Random Scripts # Random Scripts
This repository is for random scripts I wrote mostly for personal use. This repository is for random scripts I wrote mostly for personal use.

18
fix-flac-date.sh Normal file
View file

@ -0,0 +1,18 @@
#!/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!"