#!/bin/bash
#
TEXTDOMAINDIR=/usr/share/locale
TEXTDOMAIN=youtube-downloader2

TUBE="$(yad --title=$"Youtube MP3 Lataaja" --center --width=500 --height=100 --text-align=center --text=$"PUT VIDEO´S ADDRESS INTO BOX" --entry --entry-label=$"ADRESS" --entry-text="")"
if [ $? = 0 ];
then
yad --title=$"Youtube MP3 Lataaja" --center --width=500 --height=100 --text-align=center --text=$"ADDRESS IS: $TUBE"
xterm -e /bin/bash -c " yt-dlp -x --audio-format mp3 --no-playlist -o '%(title)s.%(ext)s' $TUBE "
sleep 1
yad --width=200 --center --buttons-layout=center --borders=5 --text-align=center --title=$"READY" --text=$"MP3 ladattu" --button=OK:1 --center
else exit 0
fi
