Exemple #1
0
	def play(self, widg):#pylint: disable=W0613
		""" Callback when a play is requested
		** Unused currently **, probably obsolete
		Action : Launches 'play' script with current episode parameters"""
		logging.info("playing ... " + self.serie_model.get_current_serie().name)
		if self.current_process == None :
			serie = self.serie_model.get_current_serie()
			
			command = CommandLineGenerator("serie_next")
			chemin_serie = self.serie_model.get_current_serie().get_path_to_serie()
			
			epi = serie.season.episode

			command.add_option_param("-s", unicode(serie.season.number))
			command.add_option_param("-e", unicode(epi.number))
			command.add_option_param("-G", unicode(serie.get_skip_time()))
			fps = serie.get_fps()
			if fps:
				command.add_option_param("-f", unicode(fps))
			command.add_option_param("-d", unicode(serie.get_decay_time()))
			
			subfile = get_combo_value(self.app.getitem("CandidateSubsCombo"))
			if subfile:
				command.add_option_param("-t", subfile)
			
			vidfile = self.app.getitem("NomficLabel").get_text()
			if vidfile:
				command.add_option_param("-v", vidfile)
			
			#TODO: replace this legacy code

			os.environ["SEASON"] = self.serie_model.current_serie.name
			
			self.player_handler.execute_play_command(self, command.get_command(), cwd = chemin_serie)
Exemple #2
0
	def open_filemanager(self, widg):#pylint: disable=W0613
		""" Opens a Nautilus Window on current season directory"""
		command_launch = CommandExecuter()
		command_gen = CommandLineGenerator("xdg-open")
		rep = self.serie_model.get_current_serie().get_path_to_current_season()
		command_gen.add_option_single(rep)
		command_launch.get_output(command_gen.get_command())
Exemple #3
0
	def get_candidates(self, nom_serie, num_saison, num_ep, option):
		""" dummy """
		path = self.get_path_to_season(nom_serie, num_saison)
		if os.path.exists(path):
			command_g = CommandLineGenerator("play")
			command_g.add_option_param("-e", unicode(num_ep))
			command_g.add_option_single(unicode(option))
			return self.executer.get_list_output(command_g.get_command(), cwd=path)
                
		else:
			return []
Exemple #4
0
    def get_candidates(self, nom_serie, num_saison, num_ep, option):
        """ dummy """
        path = self.get_path_to_season(nom_serie, num_saison)
        if os.path.exists(path):
            command_g = CommandLineGenerator("play")
            command_g.add_option_param("-e", unicode(num_ep))
            command_g.add_option_single(unicode(option))
            return self.executer.get_list_output(command_g.get_command(),
                                                 cwd=path)

        else:
            return []
	def test_video_play(self):
		""" Testing system mplayer presence """
		command = CommandLineGenerator("mplayer")
		command.add_option_single(__VideoPath__)
		CommandExecuter().get_output(command.get_command())
		return True
Exemple #6
0
 def test_video_play(self):
     """ Testing system mplayer presence """
     command = CommandLineGenerator("mplayer")
     command.add_option_single(__VideoPath__)
     CommandExecuter().get_output(command.get_command())
     return True