2010-06-03, 00:58
I'm still trying to understand the difference here. It makes no sense. If the username is htpc, then htpc should have access to the database.
This is the area which you are having problems getting past. It's very simple. This is how mythicalLibrarian obtains a Title and Subtitle for the episode. mythtv is supplying $InputFileBasename via user job.
You are calling /usr/local/bin/mythicalLibrarian /path/to/recording/29212_221.mpg
$InputFileBasename is the very last portion of that path, it's all after the last "/" in the input path.
You put in your MySQLuser and your MySQLpass when you set up mythTV. the $MySQLMythDb is always mythconverg with mythtv.
This is the code which is failing, it's one of the very first things mythicalLibrarian does.
So basically, you call mythicalLibrarian /path/to/file.mpg, it looks up in the mythtvdb what file.mpg is, and then it sets InputTitle and Input Subtitle variables from there for use through the rest of the program. Because it cannot get those variables, it is closing like it does not recognize the file as a mythtv library file and generating an error.
The error suggests that for one reason or another user htpc is not able to run the command mysql.
try this
1. set this up as a user job in mythtv and run it on any file or all files. It will not interfere with any operations in mythtv.
2. run it from the terminal as user htpc to verify the results
This should provide all the information required to set things right.
^^^PLEASE DO THIS FIRST SO I CAN GET DIAGNOSTIC INFORMATION^^^^
3. type this to create a link to the command mysql in an easier location.
And that should fix your problem.
This is the area which you are having problems getting past. It's very simple. This is how mythicalLibrarian obtains a Title and Subtitle for the episode. mythtv is supplying $InputFileBasename via user job.
You are calling /usr/local/bin/mythicalLibrarian /path/to/recording/29212_221.mpg
$InputFileBasename is the very last portion of that path, it's all after the last "/" in the input path.
You put in your MySQLuser and your MySQLpass when you set up mythTV. the $MySQLMythDb is always mythconverg with mythtv.
This is the code which is failing, it's one of the very first things mythicalLibrarian does.
Code:
#####INITIAL DATASE GRAB#####
##This function grabs title and subtitle from the database for use in the rest of the script
GrabTitleAndSubtitle () {
if [ "$InputTitle" = "" ]; then
InputTitle=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select title from recorded where basename like '$InputFileBasename'; "|sed s/"airdate"/""/g|sed -n "2p"`
#get year for movies
InputSubtitle=`mysql -u$MySQLuser -p$MySQLpass -e "use '$MySQLMythDb' ; select subtitle from recorded where basename like '$InputFileBasename' ; "|sed s/"Subtitle"/""/g|sed -n "2p"`
fi
return 0
}
The error suggests that for one reason or another user htpc is not able to run the command mysql.
try this
1. set this up as a user job in mythtv and run it on any file or all files. It will not interfere with any operations in mythtv.
Code:
whoami && mysql -u*USERNAME* -p*PASSWORD* & sleep 2 && killall mysql
This should provide all the information required to set things right.
^^^PLEASE DO THIS FIRST SO I CAN GET DIAGNOSTIC INFORMATION^^^^
3. type this to create a link to the command mysql in an easier location.
Code:
sudo ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
And that should fix your problem.