Compare commits
No commits in common. "b90d4d553af5ff83943786ba7bd8d61abde49a74" and "2c5854c835a755d9a60690d83538024dcfdb871c" have entirely different histories.
b90d4d553a
...
2c5854c835
@ -1,85 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# config structures
|
|
||||||
declare -A \
|
|
||||||
destinationchannels \
|
|
||||||
destinationfat32compat \
|
|
||||||
destinationcopymime \
|
|
||||||
destinationformat \
|
|
||||||
destinationfrequency \
|
|
||||||
destinationid \
|
|
||||||
destinationloss \
|
|
||||||
destinationmaxbps \
|
|
||||||
destinationnormalize \
|
|
||||||
destinationpath \
|
|
||||||
destinationquality \
|
|
||||||
destinationrename \
|
|
||||||
destinationnoresample \
|
|
||||||
destinationrenamepath \
|
|
||||||
destinationskipmime \
|
|
||||||
|| {
|
|
||||||
echo "Check your Bash version. You need >= 4.0" >&2
|
|
||||||
exit $EBASHVERS
|
|
||||||
}
|
|
||||||
|
|
||||||
declare -r \
|
|
||||||
DOCDIR=./doc \
|
|
||||||
LIBDIR=./lib \
|
|
||||||
SHAREDIR=./share
|
|
||||||
declare -r \
|
|
||||||
exampleconf=$DOCDIR/example.cfg \
|
|
||||||
schema=$SHAREDIR/schema.sql \
|
|
||||||
\
|
|
||||||
oldIFS="$IFS"
|
|
||||||
|
|
||||||
cffile="$HOME/.atom/atom.cfg"
|
|
||||||
LC_ALL=C
|
|
||||||
|
|
||||||
shopt -s extglob
|
|
||||||
|
|
||||||
for function in "$LIBDIR"/*/*
|
|
||||||
do
|
|
||||||
source "$function"
|
|
||||||
done
|
|
||||||
|
|
||||||
while getopts 'D' opt
|
|
||||||
do
|
|
||||||
case $opt in
|
|
||||||
D) (( debug++ )) ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
getConfig
|
|
||||||
|
|
||||||
openDatabase
|
|
||||||
|
|
||||||
sourcepath=''
|
|
||||||
|
|
||||||
|
|
||||||
for destination in ${!destinationpath[@]}
|
|
||||||
do
|
|
||||||
case ${destinationformat[$destination]} in
|
|
||||||
ogg) mimetype='audio/ogg vorbis' ;;
|
|
||||||
opus) mimetype='audio/ogg opus' ;;
|
|
||||||
mp3) mimetype='audio/mpeg' ;;
|
|
||||||
esac
|
|
||||||
while read filename
|
|
||||||
do
|
|
||||||
getTags
|
|
||||||
expr='^[0-9]+$'
|
|
||||||
if [[ $genre =~ $expr ]]
|
|
||||||
then
|
|
||||||
echo "$filename ($genre)"
|
|
||||||
Update destination_files last_change 0 <<-EOWhere
|
|
||||||
filename = $filename
|
|
||||||
EOWhere
|
|
||||||
fi
|
|
||||||
done < <(
|
|
||||||
find "${destinationpath[$destination]}" \
|
|
||||||
-name '*.ogg' \
|
|
||||||
-o -name '*.mp3' \
|
|
||||||
-o -name '*.opus'
|
|
||||||
)
|
|
||||||
done
|
|
||||||
|
|
||||||
closeDatabase
|
|
||||||
Loading…
x
Reference in New Issue
Block a user