0.22 Python bindings/MythTV
This class is used for general access to mythbackend through use of the [Myth Protocol] interface. By default, the class will connect to the master backend as a 'Monitor'. An alternate can be specified by either an IP address or hostname.
Contents
- 1 MythTV(backend=None, conn_type='Monitor')
- 2 close()
- 3 backendCommand(data)
- 4 getCurrentRecording(recorder_id)
- 5 getFreeRecorderList()
- 6 getPendingRecordings()
- 7 getRecorderDetails(recorder_id)
- 8 getRecorderList()
- 9 getScheduledRecordings()
- 10 getUpcomingRecordings()
- 11 isActiveBackend(hostname)
- 12 isRecording(recorder_id)
- 13 getRecording(chanid, starttime)
- 14 getRecordings()
- 15 getExpiring()
- 16 getCheckfile(program)
- 17 deleteRecording(program,force=False)
- 18 forgetRecording(program)
- 19 lockTuner(id=None)
- 20 freeTuner(id=None)
- 21 getFreeSpace(all=False)
- 22 getFreeSpaceSummary()
- 23 getLoad()
- 24 getUptime()
- 25 getLastGuideData()
- 26 getFrontends()
- 27 getFrontend(hostname)
- 28 splitInt(integer)
MythTV(backend=None, conn_type='Monitor')
Class initiator.
close()
Shortcut for calling the class destructor
backendCommand(data)
Provides direct access to Myth Protocol for functions not yet implemented in the bindings.
getCurrentRecording(recorder_id)
Returns a Program object for the program currently being recorded on the specified tuner.
getFreeRecorderList()
Returns a list of free recorder IDs (integers)
getPendingRecordings()
Returns a list of Program objects of all upcoming recording matches
getRecorderDetails(recorder_id)
Returns a Recorder object for the specified recorder
getRecorderList()
Returns a list of recorder IDs (integers)
getScheduledRecordings()
Returns a list of Program objects of recording schedules
getUpcomingRecordings()
Returns a list of Program objects of upcoming recordings that will be recorded (after duplicate and conflict filtering)
isActiveBackend(hostname)
Returns a bool as to whether the specified host is an active backend
isRecording(recorder_id)
Returns a bool as to whether the specified recorder is recording
getRecording(chanid, starttime)
Returns a Program object of the specified recording
getRecordings()
Returns a list of Program objects for all existing recordings
getExpiring()
Returns a tuple of Program objects nearing expiration
getCheckfile(program)
Returns the filesystem location of the specified recording
deleteRecording(program,force=False)
Deletes recording defined by program instance. Force will force mythtv to delete metadata even if recording file is not found
forgetRecording(program)
Allows recording defined by program instance to be re-recorded
lockTuner(id=None)
Request a tuner be locked, with an optional id for a specific tuner. Returns a tuple of ID, Video dev node, Audio dev node, and VBI dev node. ID will be <0 on failure.
freeTuner(id=None)
Unlocks a tuner specified by an optional ID. lockTuner() and freeTuner() manage an internal list of tuners locked by the instance. Not supplying an ID will cause the function to unlock all tuner in the list. This is called automatically during cleanup by the destructor.
getFreeSpace(all=False)
Returns a tuple of information about storage devices on the local system. All returns information about all systems, and a summary line
getFreeSpaceSummary()
Returns summary information of all available storage devices
getLoad()
Returns standard 1/5/15 load averages
getUptime()
Returns the machine uptime in seconds
getLastGuideData()
Returns the last date for which guide data exists. (YYYY-MM-DD)
getFrontends()
Returns a list of Frontend objects for frontends with accessible control sockets
getFrontend(hostname)
Returns a Frontend object for the given host. Will throw an exception if it cannot connect
splitInt(integer)
Returns a pair of signed high/low integers, to be used with file sizes