Browse Source

Don't push mp3-file when not converting

Jeroen De Meerleer 10 months ago
parent
commit
aa9a5c0be5
1 changed files with 5 additions and 1 deletions
  1. 5 1
      music-sync.sh

+ 5 - 1
music-sync.sh

@@ -410,7 +410,11 @@ ConvertPlaylist() {
 	for item in $(cat "$source/$line")
 	do
 		mp3item=$(echo $item | sed -e 's/\.*\//\//g'| tr -s ' ')
-		mp3item=$(echo "$mp3item" | sed -e 's/.flac/.mp3/')
+		if [[ $convert == true ]]; then
+			mp3item=$(echo "$item" | sed -e 's/.flac/.mp3/')
+		else 
+			mp3item=$(echo "$item")
+		fi
 		playline=$(echo "${mp3item}" | sed -e "s,$mappingsrc,$mappingdest,g")
 		if [[ $windowspaths == true ]]; then
 			playline=$(echo "${playline}" | sed -e 's,\/,\\,g')