diff --git a/lib/logic.lib b/lib/logic.lib index f61467f..4b09ee1 100644 --- a/lib/logic.lib +++ b/lib/logic.lib @@ -39,32 +39,22 @@ fi #first zenity gui window (paste youtube link) gui() { - VIDURL=$(${SET_GUI_BIN} --title="Zymp3 0.1-6" --height=${URL_BOX_HEIGHT} --width=${URL_BOX_WIDTH} --entry --text "Paste youtube link here: ") + VIDURL=$(${SET_GUI_BIN} --title="Zymp3 0.1-7" --height=${URL_BOX_HEIGHT} --width=${URL_BOX_WIDTH} --entry --text "Paste youtube link here: ") - if [[ ${VIDURL} == *"https://www.youtube.com"* ]];then - echo "valid URL" - if [[ $? == 0 ]] ; then + if [[ $? == 0 ]];then + if [[ ${VIDURL} == *"https://www.youtube.com"* ]];then gui2 - + else - exit 0; + ${SET_GUI_BIN} --error --text "Invalid URL" fi + else - echo "This is not a valid URL, please double check it." - ${SET_GUI_BIN} --error --text "This is not a valid URL, please double check it." - if [[ $? == 0 ]] ; then - gui - - else - exit 0; - fi + exit 0; + fi - - - -