Ejemplo n.º 1
0
	def get_channels_(self):
		self.channel_list_ = data_provider.get_channels()
		if self.channel_list_:
			if helper.SortMode.BY_NAME == self.sort_mode_:
				self.channel_list_.sort(key=lambda channel: channel.channel_name)
			else:
				self.channel_list_.sort(key=lambda channel: (channel.channel_number, channel.channel_subnumber)) 
Ejemplo n.º 2
0
 def create(self):
     try:
         if not self.channel_list_:
             self.channel_list_ = data_provider.get_channels()
         return self.create_recordings_list_()
     except common.DVBLinkError, error:
         return MessageContainer(header=IDS_CAPTION_ERROR,
                                 message=helper.get_status_string_id(error))
Ejemplo n.º 3
0
 def get_channels_(self):
     self.channel_list_ = data_provider.get_channels()
     if self.channel_list_:
         if helper.SortMode.BY_NAME == self.sort_mode_:
             self.channel_list_.sort(
                 key=lambda channel: channel.channel_name)
         else:
             self.channel_list_.sort(key=lambda channel: (
                 channel.channel_number, channel.channel_subnumber))
Ejemplo n.º 4
0
	def create(self):
		try:
			if not self.channel_list_:
				self.channel_list_ = data_provider.get_channels()
			return self.create_recordings_list_()
		except common.DVBLinkError, error:
			return MessageContainer(
				header=IDS_CAPTION_ERROR,
				message=helper.get_status_string_id(error))
 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
Ejemplo n.º 6
0
	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