Exemple #1
0
 def getRecorded(self, descending=True):
     """
     Returns a list of Program objects for recorded shows on the backend.
     """
     for prog in self._request('Dvr/GetRecorded', Descending=descending)\
                 .readJSON()['ProgramList']['Programs']:
         yield Program.fromJSON(prog, self.db)
Exemple #2
0
 def getExpiring(self):
     """
     Returns a list of Program objects for expiring shows on the backend.
     """
     for prog in self._request('Dvr/GetExpiring')\
                 .readJSON()['ProgramList']['Programs']:
         yield Program.fromJSON(prog, self.db)
Exemple #3
0
 def getProgramDetails(self, chanid, starttime):
     """
     Returns a Program object for the matching show.
     """
     starttime = datetime.duck(starttime)
     args = {'ChanId': chanid, 'StartTime': starttime.isoformat()}
     return Program.fromJSON(
             self._request('Guide/GetProgramDetails', **args)\
                 .readJSON()['Program'],
             db=self.db)