[mythtv-users] python Bindings - Get Recorded Programs Sorted by Starttime
lists at manor-farm.org
Mon Dec 13 08:39:25 UTC 2010
I am gradually converting all my python scripts from "Horrible database
hacks" to using the shiny new bindings. One thing I often want to do is
to get a list of the last n recorded programs. Myth itself allows this
with "QUERY_RECORDINGS Delete". However, unless I have missed something,
which is more than likely, the python bindings don't seem to offer this
It's relatively easy to do it yourself like this:
Class inherited from MythBE that implements a method
to return recorded programs ordered by start time.
Returns a list of all Program objects which have already recorded,
sorted by startime
recordings = self._getSortedPrograms('QUERY_RECORDINGS Delete')
# Filter out Live TV.
nolivetv = [program for program in recordings if
program["recgroup"] != "LiveTV"]
However, it would be nice to have this in the core bindings. If I write
a patch, would it be considered for inclusion?
More information about the mythtv-users