[mythtv-users] How to shedule recordings from command line?
Mario Bernard
Mario.Bernhard at gmx.net
Fri Jul 14 09:14:54 UTC 2006
>From: "Brad Templeton" <brad+myth at templetons.com>
>On Thu, Jul 13, 2006 at 11:19:36PM +0200, Mario Bernard wrote:
>> Manual recordings I do not need. What I like is to specify the channel, starttime and an overtime (or endtime).
>> I want to specify the channel, because several channels propose the same schedule for the same day, but some of them have commercials others not.
>> Although I could set priority, which I never used.
>>
>> I like to specify an endtime, when I now recordings are back-to-back. And other recordings are running aside. I have three tuners.
>>
>> Something like: -c <channel> -s 12.12.2006-14.00 -e +20
>> The +20 is plus 20 minutes or a date
>>
>> Series I always will schedule using the frontend, because they will go into another group and I want to specify daily any channel/daily every channels/ and the number of >recordings to keep.
>>
>> I will have a look into tvwish when it gets available in the fixes branch.
>
>It is not in any branch, you just download it, it's a standalone program, works with
>mythtv from .16 to current.
>
>However, it doesn't do that, though it would not take much to make it do what
>you describe above. Still not sure why mythweb can't do the job though. You're
>somewhere with just ssh and no web browser?
Yes, I use an electronic schedule guide 'TVgenial' which has a DOS command interface in which I create sql-scripts. Write them via samba to Linux. A cron job picks up the scripts and runs them. Instead of using sql-scripts I would like to call a mythtv-program who does the job.
Michael gave me a tip that inserts into recordmatch are done by the scheduler, so I removed them from my scripts, instead I call mythbackend --resched. So now I create this sql:
insert into record (type, chanid, starttime, startdate, endtime, enddate, title, subtitle, description, category, profile, autoexpire, recgroup, dupmethod, dupin, station, seriesid, autocommflag, endoffset) select 1, p.chanid, time(starttime), date(starttime), time(endtime), date(endtime), title, subtitle, description, category, 'Default', 1, 'Default', 6, 15, c.callsign, seriesid, 1, ( time_to_sec(timediff('%4 %5', '%2 %3')) - time_to_sec(timediff(endtime, starttime)) )/60 from program p, channel c where c.chanid=%1 and starttime='%2 %3' and c.chanid = p.chanid;
I am used to write sql, but others might not. My opinion is still that a common API would serve everybody, including mythweb (and tvwish; I will have a look at it).
Mario
More information about the mythtv-users
mailing list