From b1e286ec9482e1eb0b97b6e125af39b76a20337e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 13 Oct 2009 17:02:51 +0200 Subject: add aget Signed-off-by: Florian Pritz --- aget | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 aget (limited to 'aget') diff --git a/aget b/aget new file mode 100755 index 0000000..be8346d --- /dev/null +++ b/aget @@ -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 -- cgit v1.2.3-24-g4f1b