blob: 78d7f8ae292335ec243e50b34166ac8f6a0ce464 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
## vim:ft=zsh
typeset video
typeset -i cache=0
while [[ $* == -* ]] {
case $1 in
-c) cache=1
-|--) shift; break ;;
esac
shift
}
video=$1
shift
if ((cache)) {
youtube-dl -o /tmp/youtube.flv $video
mplayer $* /tmp/youtube.flv
} else {
mplayer $* $(youtube-dl -gb $video)
}
|