[mythtvnz] Finding a gap in the MythTV Scheduler

Hadley Rich mythtvnz@lists.linuxnut.co.nz
Tue, 8 May 2007 09:27:35 +1200


On Mon, 16 Apr 2007 21:22:29 Steven Ellis wrote:
> On Mon, April 16, 2007 8:50 pm, Hadley Rich wrote:
> > I'm in the process of writing python bindings/library to make it easy to
> > write python scripts that interface to mythtv. This is something that
> > could be incorporated.
>
> Your bindings would be awesome.

My initial attempt has been committed to trunk;

http://svn.mythtv.org/trac/browser/trunk/mythplugins/mythvideo/mythvideo/scripts/MythTV.py

It's in the mythvideo scripts directory at present as that's the only thing 
that uses it.

I included a function in the module which will give you a list of upcoming 
recordings quite easily.

import MythTV
m = MythTV.MythTV()

upcoming = m.getUpcomingRecordings()

print upcoming[0].title, upcoming[0].recstartts

If you've got trunk and want to have a play it may be of use.

hads

-- 
http://nicegear.co.nz
New Zealand's VoIP supplier