added mozplugger package
[hdw-linux/hdw-linux.git] / packages / multimedia / mozplugger / mplayer_plugin
1 #!/bin/sh 
2 # original by: sammy umar
3 # small modifications to leave mplayer untouched
4
5 # store argument 
6 argument="$*" 
7 # check to see if argument contains http 
8 http=`echo $argument | grep http -` 
9 # for remote/local files do things differently 
10 if [ "$http" != "" ]; then 
11 # obtain all the options until the filename/path 
12   options=${argument%http*} 
13 # get the filename 
14   file=${argument#*http} 
15 # extract the extension 
16   ext=${file##*.} 
17   if [ "$ext" = "asx" ]; then 
18     mplayer $options -playlist http$file 
19   else 
20     mplayer $*
21   fi 
22 else 
23 # if local just do the command line 
24   mplayer $* 
25 fi