Skip to content

Instantly share code, notes, and snippets.

@azend
Created August 11, 2015 15:27
Show Gist options
  • Save azend/c0b0234e38ce7b5e1a1d to your computer and use it in GitHub Desktop.
Save azend/c0b0234e38ce7b5e1a1d to your computer and use it in GitHub Desktop.
diff --git a/youloop b/youloop
index 3cb99e7..b94f06f 100644
--- a/youloop
+++ b/youloop
@@ -9,9 +9,9 @@ function loop(){
mpv=`pgrep mpv`
if [[ $url == *"youtube"* && $mpv == "" ]]
then
+ echo "$url" > /tmp/youtubeurl
mpv --hwdec vaapi --ytdl-format=bestvideo[ext=mp4]+bestaudio[ext=m4a] "$url"
fi
- echo "$url" > /tmp/youtubeurl
}
while(true)
do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment