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:
parent
407684c082
commit
a8edbc7d3c
2 changed files with 19 additions and 1 deletions
|
@ -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
18
fix-flac-date.sh
Normal 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!"
|
||||||
|
|
Loading…
Reference in a new issue