#!/bin/bash
xsetroot -cursor /usr/share/blank_cursor /usr/share/blank_cursor
xset dpms 0 0 0
/usr/bin/subtitles1 start &
lockfile=/var/run/player.pid
playlist=/store/playlist
    while [ -f /var/run/player.pid ] ; do 
	if [ -f $playlist ] ; then
	date1=`date`    
	echo "$date1 started playing playlist /store/out/playlist " >>/store/log
	cat $playlist >>/store/log
	echo "">>/store/log
#	xsetroot -cursor /usr/share/blank_cursor /usr/share/blank_cursor
#	    /usr/bin/xine -n -pfhq --no-splash -g -P $playlist
#	killall -s9 osd_titles
	for f in `cat $playlist`;do
		/usr/bin/mplayer -fs $f >/dev/null 2>/dev/null
	done    
	else 
	    sleep 120s
	fi
    done
