#!/bin/bash
#
source /etc/conf.d/vdr.admin.cfg
source /etc/conf.d/vdr

logger -s "ADMIN - GUI: $GUI"

if [ "$GUI" = "Aus" ] ; then
   rc-update del freevo
   rc-update del xdm
elif [ "$GUI" = "FreeVo" ]  ; then
   $SETVAL PLG_externalplayer 01
   rc-update add freevo default
   rc-update del xdm
   logger -s "Untersuche Audio und Videoverzeichnis - kann lange dauern !"
   freevo cache
elif [ "$GUI" = "KDE" ]  ; then
   $SETVAL PLG_externalplayer 01
   rc-update del freevo
   rc-update add xdm default
else
   echo "Unknown GUI parameter $1"
   exit 1
fi
exit 0
