1
0
Fork 0

add rg-dir

This commit is contained in:
tastytea 2024-04-05 01:27:50 +02:00
parent fe6a2290a9
commit 1c7de9abe3
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 17 additions and 0 deletions

17
.config/zsh/functions/rg-dir Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env zsh
# apply replay gain tags to files in ${1}
setopt LOCAL_OPTIONS ERR_RETURN NO_UNSET PIPE_FAIL
setopt CSHNULLGLOB # remove non-matching globs but cancel if nothing matches
local dir=${1}
rsgain custom \
--album \
--tagmode=i \
--loudness=-18 \
--clip-mode=p \
--id3v2-version=keep \
--opus-mode=d \
--preserve-mtimes \
${dir}/*.{flac,mp3,m4a,opus,ogg,oga,wma,wav,wv,aiff,ape}