示例#1
0
	def set_current_episode_number(self, num):
		""" Setter for current episode number in current serie 
		and current season (TODO: check for deletion)"""
		Serie.set_current_episode_number(self, num)
		debug("setting num ep courant")
		nomfic = self.get_current_season_configfile()
		skip = decay = 0
		fps = ""
		if os.path.exists(nomfic):
			skip = self.manager\
					.read_num_conf_var(nomfic, self.manager.skip_time_var)
			fps = self.manager\
					.read_conf_var(nomfic, self.manager.fps_var)
			decay = self.manager\
					.read_num_conf_var(nomfic, self.manager.decay_time_var)
			
			if skip != None :
				self.skiptime = skip

			if decay != None :
				self.decaytime = decay

			if fps != None :
				self.fps = fps
		else:
			pass
示例#2
0
    def set_current_episode_number(self, num):
        """ Setter for current episode number in current serie 
		and current season (TODO: check for deletion)"""
        Serie.set_current_episode_number(self, num)
        debug("setting num ep courant")
        nomfic = self.get_current_season_configfile()
        skip = decay = 0
        fps = ""
        if os.path.exists(nomfic):
            skip = self.manager\
              .read_num_conf_var(nomfic, self.manager.skip_time_var)
            fps = self.manager\
              .read_conf_var(nomfic, self.manager.fps_var)
            decay = self.manager\
              .read_num_conf_var(nomfic, self.manager.decay_time_var)

            if skip != None:
                self.skiptime = skip

            if decay != None:
                self.decaytime = decay

            if fps != None:
                self.fps = fps
        else:
            pass
示例#3
0
	def __init__(self, name, series_manager):
		self.manager = series_manager
		Serie.__init__(self, name)
		skip = None
		fps = None
		decay = None
		self.subtitle_file_name = None
		config = self.get_current_season_configfile()
		self.season_num = self.get_stored_current_season_number()
		self._season = self.get_season(self.season_num)

		if os.path.exists(config):
			try:
				skip = self.manager.read_num_conf_var(config, \
						self.manager.skip_time_var,
						0)
			finally:
				skip = 0
			try:
				fps = self.manager.read_conf_var(config, \
					self.manager.fps_var,
					None)
			except ConfigManager.KeyException:
				fps = None
	
			decay = self.manager.read_num_conf_var(config, \
					self.manager.decay_time_var)
			liste_sub = self.get_subtitle_list()

			if len(liste_sub)>0:
				self.subtitle_file_name = liste_sub[0]
			self.season_num = self.manager\
					.get_stored_current_season_number(self.name)

		if skip != None :
			self.skiptime = skip 
		if decay != None :
			self.decaytime = decay
		
		self.fps = fps
		self._season = self.get_season(self.season_num)
示例#4
0
    def __init__(self, name, series_manager):
        self.manager = series_manager
        Serie.__init__(self, name)
        skip = None
        fps = None
        decay = None
        self.subtitle_file_name = None
        config = self.get_current_season_configfile()
        self.season_num = self.get_stored_current_season_number()
        self._season = self.get_season(self.season_num)

        if os.path.exists(config):
            try:
                skip = self.manager.read_num_conf_var(config, \
                  self.manager.skip_time_var,
                  0)
            finally:
                skip = 0
            try:
                fps = self.manager.read_conf_var(config, \
                 self.manager.fps_var,
                 None)
            except ConfigManager.KeyException:
                fps = None

            decay = self.manager.read_num_conf_var(config, \
              self.manager.decay_time_var)
            liste_sub = self.get_subtitle_list()

            if len(liste_sub) > 0:
                self.subtitle_file_name = liste_sub[0]
            self.season_num = self.manager\
              .get_stored_current_season_number(self.name)

        if skip != None:
            self.skiptime = skip
        if decay != None:
            self.decaytime = decay

        self.fps = fps
        self._season = self.get_season(self.season_num)