def run(self): wgt = self.tabs.currentWidget() model = shenidam.FileProcessorModel() model.base_fn = wgt.base() model.input_tracks = wgt.input() model.output_params = wgt.output() model.__dict__.update(self.prefs.data()) try: shenidam.check_model(model) except shenidam.ModelException as e: message_box = QtGui.QMessageBox() message_box.setText("ERROR: "+unicode(e)) message_box.exec_() return launch(model)
def run(self): wgt = self.tabs.currentWidget() model = shenidam.FileProcessorModel() model.base_fn = wgt.base() model.input_tracks = wgt.input() model.output_params = wgt.output() model.__dict__.update(self.prefs.data()) try: shenidam.check_model(model) except shenidam.ModelException as e: message_box = QtGui.QMessageBox() message_box.setText("ERROR: " + unicode(e)) message_box.exec_() return launch(model)
def check_params(model): if model.quiet: model.verbose = False if model.base_fn is None: error("ERROR: No base defined") return 1; if len(model.input_tracks) == 0: error("ERROR: No tracks defined.") return 1; op = model.output_params[0][0] if model.has_mapped_output and (op is None or len(op) == 0): error("ERROR: No output defined.") return 1; if model.transcode_base is None: model.transcode_base = not shenidam.Shenidam(model.shenidam).can_open(model.base_fn) try: shenidam.check_model(model) except shenidam.ModelException as e: error("ERROR: "+unicode(e)) return 0
def check_params(model): if model.quiet: model.verbose = False if model.base_fn is None: error("ERROR: No base defined") return 1 if len(model.input_tracks) == 0: error("ERROR: No tracks defined.") return 1 op = model.output_params[0][0] if model.has_mapped_output and (op is None or len(op) == 0): error("ERROR: No output defined.") return 1 if model.transcode_base is None: model.transcode_base = not shenidam.Shenidam(model.shenidam).can_open( model.base_fn) try: shenidam.check_model(model) except shenidam.ModelException as e: error("ERROR: " + unicode(e)) return 0