#!/bin/bash



PLAYER=`kdialog --icon /usr/share/pixmaps/aiso2.png --caption "AcetoneISO2" --combobox "Select a Player:" "kaffeine--method-1" "kaffeine--method-2" "vlc--method-1" "vlc--method-2"`

if test -z $PLAYER
then
exit
else
echo continua
fi

# the best solution is to let user choose between 2 methods.
# one gets directly the iso. the other one tries to do as standard dvd://
# at least one of the 2 methods must work

path=`cat $HOME/virtual-drives/.dvd-iso`

if test $PLAYER = kaffeine--method-1;then kaffeine dvd://$HOME/virtual-drives/dvd/;else echo continua;fi
#
if test $PLAYER = kaffeine--method-2;then kaffeine dvd://"$path";else echo continua;fi


if test $PLAYER = vlc--method-1;then vlc "$path";else echo continua;fi
#
if test $PLAYER = vlc--method-2;then vlc $HOME/virtual-drives/dvd/;else echo continua;fi

exit
