scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

yt (406B)


      1 #!/bin/sh
      2 format="--max-quality 135" # leave empty for default
      3 # format="-f 35/45" # leave empty for default
      4 player="mplayer -idx"
      5 playercache="2048"
      6 
      7 url="$1"
      8 
      9 yttest="youtube"
     10 
     11 if test "${url#*$yttest}" != "$url"
     12 then
     13 	format="-f 18/22" # leave empty for default
     14 	wget -O - $(youtube-dl $format -g "$url") | mplayer -cache $playercache -
     15 else
     16 	$player -cache $playercache `youtube-dl $format -g $url`
     17 fi