summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
Diffstat (limited to 'rc')
-rwxr-xr-xrc/bin/play11
1 files changed, 7 insertions, 4 deletions
diff --git a/rc/bin/play b/rc/bin/play
index 3fd688de8..73fdcf6e5 100755
--- a/rc/bin/play
+++ b/rc/bin/play
@@ -32,13 +32,16 @@ fn play1 {
case *plain*
sed 's/ //g' | while(j=`{read}){
echo $"j >[1=2]
+ t=$typ
if(~ $"j http:* https:* HTTP:* HTTPS:*){
- if(~ $#typ 0) typ=mp3
- hget -r 'Icy-MetaData: 0' $j | play1 $typ
+ if(~ $#t 0) t=mp3
+ hget -r 'Icy-MetaData: 0' $j | play1 $t
}
if not {
- if(test -r $"j)
- play1 <$"j
+ if(test -r $"j){
+ if(~ $#t 0 && ~ $"j *mp3*) t=mp3
+ play1 $t <$"j
+ }
if not {
echo $argv0: 'can''t open file:' $"j >[1=2]
}