blob: be8346dddd4b6bb6c8fe9b4f96983448ddcc82c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
|