Added conversion

This commit is contained in:
Jeroen De Meerleer 2018-11-30 13:28:29 +01:00
parent 186070cd24
commit 79d8e62d20

View File

@ -115,9 +115,22 @@ CreateFileList() {
done done
} }
ConvertFiles() {
mkdir -p /tmp/converted
while read -r line
do
VerboseOutput "Info" "Converting $line"
if [[ "/tmp/converted/$line" = */* ]]; then
mkdir -p "/tmp/converted/${line%/*}";
fi;
lame -q 0 -b 192 $source/$line /tmp/converted/$line 1>/dev/null 2>/dev/null
done < "/tmp/music-sync-filelist"
}
GetOptions $@ GetOptions $@
if [[ "$help" == true ]]; then if [[ "$help" == true ]]; then
Usage Usage
exit exit
fi fi
CreateFileList $source $dest "" CreateFileList $source $dest ""
ConvertFiles