def getExpiring(self): """ Returns a list of Program objects for expiring shows on the backend. """ for prog in self._request('Dvr/GetExpiringList')\ .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 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 getCurrentRecording(self, recorder): """ Returns a Program object for the current recorders recording. """ res = self.backendCommand( 'QUERY_RECORDER ' + BACKEND_SEP.join([str(recorder), 'GET_CURRENT_RECORDING'])) return Program(res.split(BACKEND_SEP), db=self.db)
def getProgramDetails(self, chanid, starttime): """ Returns a Program object for the matching show. """ starttime = datetime.duck(starttime) args = {'ChanId': chanid, 'StartTime': starttime.utcisoformat()} return Program.fromJSON( self._request('Guide/GetProgramDetails', **args)\ .readJSON()['Program'], db=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)
def getProgram(self): """Recorded.getProgram() -> Program object""" return Program.fromRecorded(self)