summaryrefslogtreecommitdiff
path: root/yt.sh
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-10-09 09:50:40 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-10-09 09:50:40 -0400
commitd7411594c0ca071f08da108f544902f03e2e413d (patch)
tree6d9d95e837f22112c0fe251f7898c2520847cbf3 /yt.sh
parentf015761d39ac3f0b191d804e2ce05300a4aaf500 (diff)
downloadscripts-d7411594c0ca071f08da108f544902f03e2e413d.tar.xz
scripts-d7411594c0ca071f08da108f544902f03e2e413d.zip
fixed uptime and network scripts, added transcode-screencast
Diffstat (limited to 'yt.sh')
-rwxr-xr-xyt.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt.sh b/yt.sh
index d422a66..2ec834e 100755
--- a/yt.sh
+++ b/yt.sh
@@ -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)