mirobridge Namespace Reference

Namespaces

namespace  metadata
namespace  mirobridge_interpreter_2_0_3
namespace  mirobridge_interpreter_2_5_2
namespace  mirobridge_interpreter_3_0_0
namespace  mirobridge_interpreter_3_5_0
namespace  mirobridge_interpreter_4_0_2

Functions

def getMythtvDirectories
def setUseroptions
def massageDescription
def getOldrecordedOrphans
def getStartEndTimes
def setSymbolic
def createOldRecordedRecord
def createRecordedRecords
def createVideometadataRecord
def createChannelRecord
def checkVideometadataFails
def createMiroMythVideoDirectory
def createMiroChannelSubdirectory
def getPlayedMiroVideos
def updateMythRecorded
def updateMythVideo
def printStatistics
def main

Variables

string __title__ = "mirobridge - Maintains Miro's Video files with MythTV"
string __author__ = "R.D.Vaughan"
string __purpose__
string __version__ = u"v0.6.8"
string examples_txt = u''
tuple records = mythdb.getStorageGroup(hostname=localhostname)
tuple dirname = unicode(record.dirname, 'utf8')
 storagegroup_ok = True
tuple myapp = singleinstance(u'/tmp/mirobridge.pid')

Function Documentation

def mirobridge::getMythtvDirectories (  ) 
Get all video and graphics directories found in the MythTV DB and add them to the dictionary.
Ignore any MythTV Frontend setting when there is already a storage group configured.

Definition at line 814 of file mirobridge.py.

def mirobridge::setUseroptions (  ) 
Change variables through a user supplied configuration file
abort the script if there are issues with the configuration file values

Definition at line 930 of file mirobridge.py.

def mirobridge::massageDescription (   description,
  extras = False 
)
Massage the Miro description removing all HTML.
return the massaged description

Definition at line 1011 of file mirobridge.py.

def mirobridge::getOldrecordedOrphans (  ) 
Retrieves the Miro oldrecorded records for localhostname. Match them against the Miro recorded
records and identify any orphaned oldrecorded records. Those records mean a MythTV user deleted the
Miro video from the Watched Recordings screen or from MythVideo. Delete the orphaned records from
MythTV plus any left over graphic files.
return array of oldrecorded dictionary records which are orphaned
return None if there are no orphaned oldrecorded records

Definition at line 1132 of file mirobridge.py.

def mirobridge::getStartEndTimes (   duration,
  downloadedTime 
)
Calculate a videos start and end times and isotime for the recorded file name.
return an array of initialised values if either duration or downloadedTime is invalid
return an array of the video's start, end times and isotime

Definition at line 1206 of file mirobridge.py.

def mirobridge::setSymbolic (   filename,
  storagegroupkey,
  symbolic_name,
  allow_symlink = False 
)
Convert the file into a symbolic name according to it's storage group (there may be
no storage group for the key). Check if a symbolic link exists and replace the link with a copy of
the file. except for video files. Abort if the file does not exist.
return the symbolic link to the file

Definition at line 1242 of file mirobridge.py.

def mirobridge::createOldRecordedRecord (   item,
  start,
  end,
  inetref 
)
Using the details from a Miro item record create a MythTV oldrecorded record
return an array of MythTV of a full initialised oldrecorded record dictionaries

Definition at line 1326 of file mirobridge.py.

def mirobridge::createRecordedRecords (   item  ) 
Using the details from a Miro item record create a MythTV recorded record
return an array of MythTV full initialised recorded and recordedprogram record dictionaries

Definition at line 1354 of file mirobridge.py.

def mirobridge::createVideometadataRecord (   item  ) 
Using the details from a Miro item create a MythTV videometadata record
return an dictionary of MythTV an initialised videometadata record

Definition at line 1438 of file mirobridge.py.

def mirobridge::createChannelRecord (   icon,
  channel_id,
  channel_num 
)
Create the optional Miro "channel" record as it makes the Watch Recordings screen look better.
return True if the record was created and written successfully
abort if the processing failed

Definition at line 1551 of file mirobridge.py.

def mirobridge::checkVideometadataFails (   record,
  flat 
)
Verify that the real path exists for both video and graphics for this MythVideo Miro record.
return False if there were no failures
return True if a failure was found

Definition at line 1597 of file mirobridge.py.

def mirobridge::createMiroMythVideoDirectory (  ) 
If the "Miro" directory does not exist in MythVideo then create it.
abort if there is an issue creating the directory

Definition at line 1620 of file mirobridge.py.

def mirobridge::createMiroChannelSubdirectory (   item  ) 
Create the Miro Channel subdirectory in MythVideo
abort if the subdirectory cannot be made

Definition at line 1648 of file mirobridge.py.

def mirobridge::getPlayedMiroVideos (  ) 
From the MythTV database recorded records identify all "played" Miro Video files.
return None if there were either no Miro recorded records or none that were in "watched" status
return an array of subtitles of those Miro video files that were "watched"

Definition at line 1672 of file mirobridge.py.

def mirobridge::updateMythRecorded (   items  ) 
Add and delete MythTV (Watch Recordings) Miro recorded records. Add and delete symbolic links
to coverart/Miro icons.
Abort if processing failed
return True if processing was successful

Definition at line 1699 of file mirobridge.py.

def mirobridge::updateMythVideo (   items  ) 
Add and delete MythVideo records for played Miro Videos. Add and delete symbolic links
to Miro Videos, to coverart/Miro icons, banners and Miro screenshots and fanart.
NOTE: banner and fanart graphics were provided with the script and are used only if present.
Abort if processing failed
return True if processing was successful

Definition at line 1863 of file mirobridge.py.

def mirobridge::printStatistics (  ) 

Definition at line 2020 of file mirobridge.py.

def mirobridge::main ( void   ) 
Support mirobridge from the command line
returns True

Definition at line 2049 of file mirobridge.py.


Variable Documentation

string mirobridge::__title__ = "mirobridge - Maintains Miro's Video files with MythTV"

Definition at line 22 of file mirobridge.py.

string mirobridge::__author__ = "R.D.Vaughan"

Definition at line 23 of file mirobridge.py.

Initial value:
'''
This python script is intended to synchronise Miro's video files with MythTV's "Watch Recordings" and MythVideo.

The source of all video files are from those downloaded my Miro.
The source of all meta data for the video files is from the Miro data base.
The source of all cover art and screen shots are from those downloaded and maintained by Miro.
Miro v2.0.3 or later must already be installed and configured and capable of downloading videos.
'''

Definition at line 24 of file mirobridge.py.

Definition at line 33 of file mirobridge.py.

Definition at line 213 of file mirobridge.py.

tuple mirobridge::records = mythdb.getStorageGroup(hostname=localhostname)

Definition at line 781 of file mirobridge.py.

mirobridge::dirname = unicode(record.dirname, 'utf8')

Definition at line 804 of file mirobridge.py.

tuple mirobridge::myapp = singleinstance(u'/tmp/mirobridge.pid')

Definition at line 2721 of file mirobridge.py.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri Feb 10 06:42:29 2012 for MythTV by  doxygen 1.6.3