0.24 Python bindings/Data Handlers
Contents
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
| ||||||
toString
| ||||||
open
| ||||||
delete
| ||||||
formatPath
| ||||||
formatJob
|
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
- outputs
- recstatus <int>
- description
- This method queries the pending recordings from the backend, and determines if the guide object has a special record status, otherwise returning 0.
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.
generic
These are several methods shared by all classes of this type.
create
- inputs
- data=None <dict>
- outputs
- self
- description
- Creates a new entry in the database, pulling from the existing data in the object, and supplementing with an optional dictionary. This method will only work if the object has not yet been initialized against an existing database entry.
update
- inputs
- follows standard dict.update() syntax
- description
- Updates the local object with any given changes, and then pushes the data contained in the object onto the database. This method will only work if the object has a matching database entry.
delete
- description
- Deletes database entry matched to object.
Record
getUpcoming
fromGuide
(classmethod)
fromProgram
(classmethod)
Recorded
cast
seek
markup
open
formatPath
importMetadata
fromProgram
(classmethod)
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)