0.24 Python bindings/Data Handlers
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
>>> rec <Recorded 'Archer','2010-10-02 23:00:00' at 0x8056b28a0> >>> Program.fromRecorded(rec) <Program 'Archer','2010-10-02 23:00:00' at 0x8056bc9a0> | ||||||
toString
| ||||||
open
| ||||||
delete
| ||||||
formatPath
>>> prog.formatPath('%T/(%oY%-%om%-%od) %S') 'Archer/(2010-01-14) .mpg' | ||||||
formatJob
>>> prog.formatJob('/some/job %DIR% %FILE% %TITLE%') /some/job /srv/mounts/mythtv/video 2062_20101002230000.mpg Archer |
Database Read-Only
These classes provide mapped access to a single entry in a database table. The table columns are accessible as the same name as attributes or keys. The class otherwise behaves as a dictionary.
Guide
This class maps to guide data in the `program` table. This class can be populated from the database directly, or from MythXML.
getRecStatus
|
InternetContent
This class maps to an installed grabber in the `internetcontent` table.
InternetContentArticles
This class maps to a grabbed internet video in the `internetcontentarticles` table.
Database Read-Write
These classes map to a single entry in a database table, and allow creation, alteration, and deletion in addition to just read access.
These are shared methods supported by all read/write classes.
create
>>> vid = Video().create({'title':'test file', 'filename':'path/to/test/file.avi', 'hash':'00000000'}) >>> vid <Video 'test file' at 0x8051b8ae0> | ||||||
update
| ||||||
delete
|
Record
This class manages recording rules. Editing a rule automatically issues a reschedule. delete() and create() both take a wait keyword argument, which will cause the function to wait until the backend has completed its reschedule run.
getUpcoming
>>> rec <Record Rule 'The Office', Type 3 at 0x8051d54e0> >>> rec.getUpcoming() [<Program 'The Office','2010-10-07 21:00:00' at 0x8052e2ee0>, <Program 'The Office','2010-10-14 21:00:00' at 0x8055fb520>] | ||||||
fromGuide
| ||||||
fromProgram
|
Recorded
cast
seek
markup
open
| ||||||
formatPath
>>> rec.formatPath('%T/(%oY%-%om%-%od) %S') 'Archer/(2010-01-14) .mpg' | ||||||
importMetadata
| ||||||
fromProgram
|
RecordedProgram
fromRecorded
(classmethod)
OldRecorded
setDuplicate
Job
setComment
setStatus
Channel
Video
cast
genre
country
markup
open
openBanner
openCoverart
openFanart
openScreenshot
openTrailer
getHash
parseFilename
importMetadata
fromFilename
(classmethod)
Song
fromAlbum
(classmethod)
fromArtist
(classmethod)
fromPlaylist
(classmethod)
Album
fromArtist
(classmethod)
fromSong
(classmethod)
Artist
fromName
(classmethod)
fromSong
(classmethod)
fromAlbum
(classmethod)
MusicPlaylist
fromSong
(classmethod)
MusicDirectory
fromPath
(classmethod)