55 lines
1.6 KiB
Bash
55 lines
1.6 KiB
Bash
#!/bin/bash
|
|
printConfig() {
|
|
{
|
|
echo "General|Config file|$cffile"
|
|
[ -n "$ionice" ] && echo "|IO Nice|$ionice"
|
|
cat <<-EOF
|
|
|Load|$maxload
|
|
|Load Interval|$loadinterval
|
|
|Temp Dir|$tempdir
|
|
|Database|$database
|
|
|Debug|$debug
|
|
Source|Path|$sourcepath
|
|
EOF
|
|
for prune_expression in "${skippeddirectories[@]}"
|
|
do
|
|
(( printed )) \
|
|
&& echo -n '||' \
|
|
|| echo -n '|Skipped directories|'
|
|
echo "$prune_expression"
|
|
printed=1
|
|
done
|
|
unset printed
|
|
for destination in ${!destinationpath[@]}
|
|
do
|
|
cat <<-EOF
|
|
$destination|Path|${destinationpath["$destination"]}
|
|
|Format|${destinationformat["$destination"]}
|
|
|Quality|${destinationquality["$destination"]}
|
|
EOF
|
|
if [[ ${destinationformat["$destination"]} == opus ]]
|
|
then
|
|
echo "|Expected loss|${destinationloss["$destination"]}"
|
|
elif [[ ${destinationformat["$destination"]} == mp3 ]]
|
|
then
|
|
echo "|Prevent resampling|${destinationnoresample["$destination"]}"
|
|
fi
|
|
cat <<-EOF
|
|
|Normalize|${destinationnormalize["$destination"]}
|
|
|Channels|${destinationchannels["$destination"]}
|
|
|Frequency|${destinationfrequency["$destination"]}
|
|
|Higher than|${destinationmaxbps["$destination"]}
|
|
|Fat32 Compat.|${destinationfat32compat["$destination"]}
|
|
|Path Change|${destinationrenamepath["$destination"]}
|
|
|File Rename|${destinationrename["$destination"]}
|
|
EOF
|
|
[ -n "${destinationskipmime["$destination"]}" ] \
|
|
&& echo "|Skipped mime-types|${destinationskipmime["$destination"]//\|/
|
|
||}"
|
|
[ -n "${destinationmskipime["$destination"]}" ] \
|
|
&& echo "|Copied mime-types|${destinationcopymime["$destination"]//\|/
|
|
||}"
|
|
done
|
|
}|column -t -s'|' -n
|
|
}
|