[mythtv-users] mythdb and python bindings Q

Michael T. Dean mtdean at thirdcontact.com
Tue Jan 21 17:16:05 UTC 2014


On 01/21/2014 11:44 AM, Yan Seiner wrote:
> I've been playing around with python and mythtv bindings.
>
> I understand how to retrieve information using the primary keys in the 
> tables.
>
> I'd like to be able to retrieve chanid and starttime using the 
> filename, though....
>
> select chanid from recorded where basename=$myfilename
> select starttime from recorded where basename=$myfilename
>
> I've been through the examples and I have not found a python way to do 
> the above; but there must be a way.

http://www.mythtv.org/wiki/0.26_Python_Bindings/Connection_Handlers#MythDB

(using basename)

basically

from MythTV import MythDB
recs=MythDB().searchRecorded(basename='2131_20130103010000.mpg');

See, for example, http://www.mythtv.org/wiki/Delete_recordings.py

Mike


More information about the mythtv-users mailing list