if test -z $(which cutmp3)
then kdialog --error "You are missing cutmp3. Please install it." ; exit
fi

if test -z "$2"
then 
name=$(kdialog --getopenfilename $HOME "*.mp3" --title "Please select which MP3 you want to cut")
if [ -z "$name" ] ; then exit ; fi
cutmp3.tk | cutmp3 -i "$name"
exit
fi

cutmp3.tk | cutmp3 "$@"
