mdisk: Avoid delay when mounting disks with a `/.dontsleep/` directory
[sunny256-utils.git] / mtube
blob7d6c0c34fd1e6a196c715f4d90dc6bf2202c3900
1 #!/usr/bin/env bash
3 #=======================================================================
4 # mtube
5 # File ID: b76283f2-33fc-11de-8bbf-000475e441b9
6 # Play YouTube videos in mplayer. Found at
7 # <http://www.shell-fu.org/lister.php?id=701>.
8 # License: GNU General Public License version 2 or later.
9 #=======================================================================
11 function mtube {
12 video_id=$(curl -s $1 | sed -n "/watch_fullscreen/s;.*\(video_id.\+\)&title.*;\1;p");
13 mplayer -fs $(echo "http://youtube.com/get_video.php?$video_id");
16 mtube "$@"