diff options
Diffstat (limited to 'bin/common')
-rwxr-xr-x | bin/common/ytclipo | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/common/ytclipo b/bin/common/ytclipo index 337064d..e97cb94 100755 --- a/bin/common/ytclipo +++ b/bin/common/ytclipo @@ -4,10 +4,9 @@ test -z "${inp:=${1:-"$(xclip -sel c -o)"}}" && inp="$(cat /dev/stdin)" -echo "inp: ${inp}" 1>&2 # take last link from clipboard # works when link is from yt-local -inp="$(echo -n "$inp" | awk -F 'https?://' '{print $NF}')" +inp="https://youtu.be/$(echo "$inp" | sed 's/.*\(.\{11\}\)$/\1/')" echo "inp: ${inp}" 1>&2 notify-send "ytclipo" "<b>downloading</b> $inp" |