dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit d16eb6ffa25797bb925c9169102201478b736197
parent 770dfd2bf37e2ca9b2029a82196c89901bf5ac04
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Tue, 19 Jul 2022 21:56:48 -0400

Update flac-to-mp3 script

Diffstat:
M.local/bin/flac-to-mp3 | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.local/bin/flac-to-mp3 b/.local/bin/flac-to-mp3 @@ -1,7 +1,8 @@ #!/bin/bash MUSICDIR="$HOME/Downloads" -MAXJOBS=$(nproc) +# MAXJOBS=$(nproc) +MAXJOBS=10 convert() { @@ -13,9 +14,12 @@ convert() wait -n; numJobs=$((numJobs-1)) fi - fileName=$(basename -s .flac "$thing") + fileName=$(basename -s .flac -s .wav -s .mp3 "$thing") dirName=$(dirname "$thing") mkdir -vp "$MUSICDIR/$dirName" + if [ -f "$MUSICDIR/$dirName/$fileName.mp3" ]; then + echo "$thing" already converted. + fi echo "Converting $thing" ffmpeg -y -hide_banner -loglevel error -i "$thing" -q:a 1 \ "$MUSICDIR/$dirName/$fileName".mp3 &