2010-02-09, 07:33
Code:
#####REMOVE ENTRIES FROM LIBRARY#####
#remove mythtv recording's pictures and database entries. Thanks to barney_1.
SYMLINKDisabled () {
#Make sure we got input arguments and file is valid
if [ ! -f "$3" ]; then
#Remove recording entry from mysql database
echo "REMOVING - $FileBaseName - THUMBNAILS - DATABASE ENTRIES">>"$mythicalLibrarian"/output.log
echo "REMOVING - $FileBaseName - THUMBNAILS - DATABASE ENTRIES"
mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; delete from recorded where basename like '$FileBaseName'; "
#Remove thumbnails
rm -f "$originaldirname/$FileBaseName".*
fi
}
Just did another revision update removed some randomness from that last one. Gee, I wish I could test this before uploading, but if I did, then I'd loose data.