0.24 Python bindings/Data Handlers

From MythTV Official Wiki
Revision as of 19:58, 16 August 2010 by Wagnerrp (talk | contribs) (Backend Data)

Jump to: navigation, search

Backend Data

These classes are not intended to be called directly, but only returned from methods in MythBE and MythXML. The classes are similar to dictionaries, whose data can also be accessed as class attributes.

FreeSpace

Refers to one disk defined in the backend for storage group use. Computes several additional values from the original data.

>>> fs = be.getFreeSpace().next()
>>> fs
<FreeSpace '/mnt/mythtv/recordings@mythtrunk' at 0x804e7f0e0>
>>> fs.items()
[('host', u'mythtrunk'), ('path', u'/mnt/mythtv/recordings'), ... , ('us_low', 19550336)]
>>> fs.totalspace, fs.usedspace, fs.freespace
(119116800, 19550336, 99566464)

Program

Refers to a single upcoming or existing recording.

fromRecorded

inputs
Recorded object
outputs
Program object
description
returns a Program object from an existing Recorded object

toString

outputs
serialized data <string>
description
outputs as string with values separated by '[]:[]', for use over mythprotocol

open

inputs
type='r' <string>
outputs
file object
description
opens program for read or write, will automatically decide between filesystem, mythproto, or mythxml for how to access file

delete

inputs
force=False <boolean>
rerecord=False <boolean>
description
Deletes a recording, and optionally marks it for re-record. If force is False, the call will fail if mythbackend cannot find a file to delete matching the program. Setting force to True will cause it to be deleted anyway, possibly resulting in an orphaned file.

formatPath

Outputs a formatted file path using the syntax of mythlink.pl.

formatJob

Outputs a formatted command string using the syntax of MythJobqueue and MythSystemEvents.

Database Read-Only

Guide

InternetContent

InternetContentArticles

Database Read-Write

Record

Recorded

RecordedProgram

OldRecorded

Job

Channel

Video

Song

Album

Artist

MusicPlaylist

MusicDirectory