Video URL is now checked for validity
This commit is contained in:
@@ -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: ")
|
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
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user