[mythtv] Re:Recurring Manual Recordings

Christian Hack christianh at pdd.edmi.com.au
Tue Sep 23 17:50:58 EDT 2003


> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org 
> [mailto:mythtv-dev-bounces at mythtv.org] On Behalf Of Christian Hack
> Sent: Tuesday, 23 September 2003 4:42 PM
> To: 'Development of mythtv'
> Subject: RE: [mythtv] Re:Recurring Manual Recordings
> 
> 
> > -----Original Message-----
> > From: mythtv-dev-bounces at mythtv.org 
> > [mailto:mythtv-dev-bounces at mythtv.org] On Behalf Of Rick Warner
> > Sent: Tuesday, 23 September 2003 4:01 PM
> > To: Development of mythtv
> > Subject: Re: [mythtv] Re:Recurring Manual Recordings
> > 
> > 
> > On Tuesday 23 September 2003 01:34 am, a a wrote:
> > > Is there anything that needs to be kicked in order for
> > > rows I manually inserted into program and record to be
> > > handled by mythbackend?  I'm not able to get this cron
> > > script to consistently work.  It seems like if the
> > > rows are inserted and mythbackend is not touched, then
> > > it misses the recording... but I'm still trying to
> > > track down the exact circumstances.  
> > >
> > > Am I out to lunch to think that something has to be
> > > notified in order for the table to be scanned again?
> > > If so, is there a good way to do it from a cron
> > > script?
> > >
> > > Thanks,
> > >
> > > Brett
> > In general, most programs will re-read stuff when a HUP 
> > signal is sent.  If 
> > this is not already being checked for, it should be added to 
> > the signal 
> > handling.  You could then just run "killall -HUP mythbackend" 
> > to force 
> > mythbackend to reread tables, etc (whatever you set up 
> > mythbackend to do when 
> > it receives the signal basically)
> > 
> 
> Yes. There is a special entry in the settings table. I can't remember
> what it's called exactly, but when I did an SMS to recording script, I
> needed to set this value so mythbackend realised something new had
> changed. I found it in the MythWeb stuff. Sorry can't get to any of it
> here. Better than sending a HUP and apparently the correct way to do
> things.
> 
> Someone else I'm sure can tell you what it's called. 
> Otherwise I'll try
> and remember to look tonight.
> 

OK reply to my own post. Here's a cut from the old mythweb. It's what I
used and it works. Although I believe the initial comment about
mythfrontend should read mythbackend.

This just checks to see if the DB entry is there and creates if
required. It also sets the value to yes to make the signal to the
backend.

Hopefully my mail client won't munge this too bad.

//
//	Tell mythfrontend that something has changed
//
$alreadyThere = mysql_query("select value from settings where value =
\"RecordChanged\"");
if(mysql_num_rows($alreadyThere) < 1)
{
	mysql_query("insert into settings (value,data) values
(\"RecordChanged\",\"yes\")");
}
else
{
	mysql_query("update settings set data = \"yes\" where value =
\"RecordChanged\"");
}



More information about the mythtv-dev mailing list