#!/bin/sh
# Script to add uade:// prefixed songs into XMMS playlist. This is useful
# to avoid conflicts with protracker songs with modplug and other XMMS
# plugins. Any other plugin will not accept uade:// prefixed entries from
# the playlist.

for i in "$@" ; do
    if test -z "`echo $i |grep ^/`" ; then
	i="`pwd`/$i"
    fi
    if test -f "$i" ; then
	xmms -e "uade://"$i""
    elif test -d "$i" ; then
	find "$i"/ -type f |while read line ; do
	    echo "uade://"$line""
	done |tr \\n \\0 |xargs -0 xmms -e
    fi
done
