Added conversion

This commit is contained in:
Jeroen De Meerleer 2018-11-30 13:28:29 +01:00
parent 186070cd24
commit 79d8e62d20
1 changed files with 14 additions and 1 deletions

View File

@ -115,9 +115,22 @@ CreateFileList() {
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 $@
if [[ "$help" == true ]]; then
Usage
exit
fi
CreateFileList $source $dest ""
CreateFileList $source $dest ""
ConvertFiles