diff options
author | Florian Pritz <bluewind@xssn.at> | 2009-10-13 17:02:51 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2009-10-13 17:02:51 +0200 |
commit | b1e286ec9482e1eb0b97b6e125af39b76a20337e (patch) | |
tree | 1a329d8d2c64214b916f8113bf5dfce386775bc9 /aget | |
parent | a7e38122146bef98e7eb35cfb022340afd840c77 (diff) | |
download | bin-b1e286ec9482e1eb0b97b6e125af39b76a20337e.tar.gz bin-b1e286ec9482e1eb0b97b6e125af39b76a20337e.tar.xz |
add aget
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'aget')
-rwxr-xr-x | aget | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -0,0 +1,16 @@ +#!/bin/bash +# atget - download trailers from Apple website + +# Usage if no parameters given +if [ -z $@ ]; then + echo "atget apple-trailer-url"; exit +fi + +# Prepend 'h' before resolution to create a valid url +newurl=$(echo $@ | sed 's/_\([0-9]*[0-9][0-9][0-9]\)p.mov/_h\1p.mov/g') + +# Download trailer and save to the desktop +wget -U QuickTime/7.6.2 "$newurl" -O $HOME/${@##*/} + +# Play trailer with mplayer (using 200MB cache to be sure trailer is dl'd first) +#mplayer -cache 200000 -user-agent 'QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)' $newurl |