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)
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)
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)