diff --git a/config/zymp3.conf b/config/zymp3.conf index 5c721eb..b02f4cc 100644 --- a/config/zymp3.conf +++ b/config/zymp3.conf @@ -12,9 +12,9 @@ SET_GUI_BIN="zenity" #MUSICDIR must have trailing forward slash MUSICDIR="/home/$USER/Music/" #your choice -#You shouldn't need to change this filename but just in case +#You shouldn't need to change these filename but just in case VIDEOFILE=/tmp/youtube-dl-$RANDOM-$RANDOM.flv - +CONVERTED=/tmp #GUI SETTINGS diff --git a/lib/logic.sh b/lib/logic.sh index 2bac4fd..612432e 100644 --- a/lib/logic.sh +++ b/lib/logic.sh @@ -26,7 +26,7 @@ if [ ! -f $VIDEOFILE ];then exit 0; elif [ -f $VIDEOFILE ];then - ${SET_CONV_TOOL} -i $VIDEOFILE -acodec libmp3lame -ac 2 -ab 128k -vn -y "$2" | ${SET_GUI_BIN} --progress --pulsate --title="Converting..." --text="Converting video to mp3.." --auto-close + ${SET_CONV_TOOL} -i $VIDEOFILE -acodec libmp3lame -ac 2 -ab 128k -vn -y "${CONVERTED}/$2" | ${SET_GUI_BIN} --progress --pulsate --title="Converting..." --text="Converting video to mp3.." --auto-close rm ${VIDEOFILE} else @@ -96,10 +96,10 @@ open() move() { if [ -d ${MUSICDIR} ];then - mv -v "${AUDIOFILENAME}.mp3" ${MUSICDIR} + mv -v "${CONVERTED}/${AUDIOFILENAME}.mp3" ${MUSICDIR} elif [ ! -d ${MUSICDIR} ];then mkdir ${MUSICDIR} - mv -v "${AUDIOFILENAME}.mp3" ${MUSICDIR} + mv -v "${CONVERTED}/${AUDIOFILENAME}.mp3" ${MUSICDIR} fi