diff options
Diffstat (limited to 'yt.sh')
-rwxr-xr-x | yt.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -47,7 +47,8 @@ prompt_url() { ## Grab url from clipboard/primary selection, else get via prompt grab_url() { - if url=$(xclip -o -selection clipboard 2>/dev/null || echo) && check_if_youtube $url; then + if url="$1" && check_if_youtube $url; then + elif url=$(xclip -o -selection clipboard 2>/dev/null || echo) && check_if_youtube $url; then elif url=$(xclip -o 2>/dev/null || echo) && check_if_youtube $url; then elif url=$(grab_url_stdin) && check_if_youtube $url; then elif url=$(prompt_url) && check_if_youtube $url; then @@ -131,7 +132,7 @@ print_info() { ## Main mkdir -p "$DOWNLOAD_DIR" -url=$(grab_url) +url=$(grab_url "$1") case "$(get_action_single)" in 5) |