#!/bin/bash
source ~/ImporTiVo_Settings.sh


if [ -f config/stop.processing ]
then
	echo "Aborting: stop.processing file found in config directory"
	exit 0
else
	

if [ -f EncodeList.inprogress ]
then
	echo Aborting: EncodeList is running...
	exit 0
fi

touch EncodeList.inprogress
rm -f ./queue/encode.sh
rm -f ./queue/encode.txt

./buildEncodingScripts
./buildQueue encode
./queue/encode.sh



rm -f EncodeList.inprogress


fi
