[mythtv-users] How to shedule recordings from command line?

Brad Templeton brad+myth at templetons.com
Wed Jul 12 18:37:30 UTC 2006


On Wed, Jul 12, 2006 at 07:35:43PM +0200, Mario Bernard wrote:
> I have made a Scheduling Interface for use with TVGenial, a Windows oriented TV Schedule Applikation. It allows to record programs and calls an DOS Command line. I used this interface to create sql scripts which manupulate the database. 
> Backdraws are, that I should have knowledge about the DB and changing the DB does not always reschedule the new recordings immediately.
> 
> It would be great if I could call a PHP program from Mythweb, specifying the recording arguments and the job gets done.
> One year ago, before a lot of reworking was projected for Mythweb, I had a look, but could not easily identify if one PHP Program could do the job.
> 
> Mario
> 


Well, in that sense, mysql is a command line interface for mythtv.  One can
schedule programs in mythtv just with simple sql queries, often doable from
the command line interface of the mysql command.

Or of course it's easy to do SQL in PHP, Perl and other programming languages.

Invoking a PHP program from mythweb is trivial.  Mythweb IS a PHP program.

The only missing element, after you do an SQL command to schedule a show,
is if you want to schedule a show _immediately_ you need to tell the backend
to do a schedule run.   This is a pretty simple command which you can
even do by hand in a pinch, but you will find a very simple library routine
to do it in the mythlib.pl library with tvwish, and I heard a report that
SVN now has contributed to it a similar library simply called the perl bindings.

I don't know how long it takes for mythtv to do a reschedule_recordings on its
own spontaneously, but I believe it does happen, in which case for recordings
in the future you can just do SQL commands and that would be enough.


More information about the mythtv-users mailing list