Video URL is now checked for validity
This commit is contained in:
parent
a9c3e64f13
commit
34ed4ee4c1
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user