summarylogtreecommitdiffstats
path: root/youtube-dl-mp3
blob: 6ea53f1f2634b198c7ace4e811951e823a3d4dd8 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash

# Check if xclip is installed and no argument are passed
if [ -x "$(command -v xclip)" ] && [ "$#" -le 1 ] ; then
	youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --ignore-errors -o "%(title)s.%(ext)s" "$(xclip -o)"
else
	youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 --ignore-errors -o "%(title)s.%(ext)s" $@
fi