Exemplo n.º 1
0
 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)
Exemplo n.º 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)
Exemplo n.º 3
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)
Exemplo n.º 4
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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)
Exemplo n.º 7
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)
Exemplo n.º 8
0
 def getProgram(self):
     """Recorded.getProgram() -> Program object"""
     return Program.fromRecorded(self)
Exemplo n.º 9
0
 def getProgram(self):
     """Recorded.getProgram() -> Program object"""
     return Program.fromRecorded(self)