rppodplay (338B)
1 #!/bin/sh 2 3 if [ -z "$AUDIOPLAYER" ]; 4 then 5 if [ -z "$MEDIAPLAYER" ]; 6 then 7 echo "\$MEDIAPLAYER or \$AUDIOPLAYER should be set for" \ 8 " playing the media." 9 exit 1 10 fi 11 player="$MEDIAPLAYER" 12 else 13 player="$AUDIOPLAYER" 14 fi 15 16 url=$(rpview "$@" | awk '/Enclosure:/ {print $2}' | tr -d '\r') 17 for i in $url 18 do 19 echo $i 20 $player "$i" 21 done 22