Video URL is now checked for validity

This commit is contained in:
Justin Moore 2015-03-04 19:01:03 -06:00
parent a9c3e64f13
commit 34ed4ee4c1

View File

@ -41,12 +41,29 @@ gui()
{
VIDURL=$(${SET_GUI_BIN} --title="Zymp3 0.1-6" --height=${URL_BOX_HEIGHT} --width=${URL_BOX_WIDTH} --entry --text "Paste youtube link here: ")
if [[ $? == 0 ]] ; then
gui2
if [[ ${VIDURL} == *"https://www.youtube.com"* ]];then
echo "valid URL"
if [[ $? == 0 ]] ; then
gui2
else
exit 0;
fi
else
exit 0;
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
fi