diff options
Diffstat (limited to 'lynx-youtube-handler')
| -rwxr-xr-x | lynx-youtube-handler | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lynx-youtube-handler b/lynx-youtube-handler index da71719..df2dcb1 100755 --- a/lynx-youtube-handler +++ b/lynx-youtube-handler @@ -1,13 +1,13 @@ #!/usr/bin/env bash # open youtube link in mpv +# remove gopher section of URL passed +# by Lynx as mpv doesn't understand it URL=https:$(awk -F'https%3a' '{print $2}' <<< "$1") if curl --head --silent $URL > /dev/null 2>&1; then - echo "Opening Youtube video $URL" >> $HOME/.lynx-log notify-send "Launching mpv $URL" mpv $URL >/dev/null 2>&1 & else - echo "Youtube video: invalid URL $URL" >> $HOME/.lynx-log notify-send "invalid URL $URL" fi |
