def get_recordings_(self): recordings = data_provider.get_recordings() if self.recording_only_: return [ recording for recording in recordings if recording.program and recording.program.is_record ] return recordings
def create_channel_epg_list_(self): oc = ObjectContainer( no_history = True, no_cache = True, title1 = IDS_GUIDE_MENU_ITEM, title2 = self.channel_name_, art = R(helper.ART_TV_GUIDE)) time_now = common.datetime_to_ctime(datetime.datetime.now()) programs_dict = data_provider.get_channel_epg(self.channel_id_) self.recording_list_ = data_provider.get_recordings() if None != programs_dict and programs_dict.has_key(self.channel_id_): channel_programs = programs_dict[self.channel_id_] for program in channel_programs: if time_now < program.start_time + program.duration: program_object = self.create_program_item_(program) oc.add(program_object) return oc
def create_program_list_(self, programs_dict, title_1, title_2): oc = ObjectContainer(no_history=True, no_cache=True, title1=title_1, title2=title_2, art=R(helper.ART_SEARCH)) time_now = common.datetime_to_ctime(datetime.datetime.now()) channels = data_provider.get_channels() #stream_info_dict = data_provider.get_stream_info() self.recording_list_ = data_provider.get_recordings(False) if len(programs_dict) and len(channels): program_list = self.get_programs_(programs_dict) for list_item in program_list: channel = common.search_channel(channels, list_item[0]) if channel: program = list_item[1] if time_now < program.start_time + program.duration: program_object = self.create_program_item_( program, channel) oc.add(program_object) return oc
def create_program_list_(self, programs_dict, title_1, title_2): oc = ObjectContainer( no_history = True, no_cache = True, title1 = title_1, title2 = title_2, art = R(helper.ART_SEARCH)) time_now = common.datetime_to_ctime(datetime.datetime.now()) channels = data_provider.get_channels() #stream_info_dict = data_provider.get_stream_info() self.recording_list_ = data_provider.get_recordings(False) if len(programs_dict) and len(channels): program_list = self.get_programs_(programs_dict) for list_item in program_list: channel = common.search_channel(channels, list_item[0]) if channel: program = list_item[1] if time_now < program.start_time + program.duration: program_object = self.create_program_item_(program, channel) oc.add(program_object) return oc
def get_recordings_(self): recordings = data_provider.get_recordings() if self.recording_only_: return [recording for recording in recordings if recording.program and recording.program.is_record] return recordings
def get_recordings_(self): return [recording for recording in data_provider.get_recordings() \ if recording.program and recording.program.is_record]