def Addprof(self): """ Storing new profile in the 'Preset Manager' panel with the same current setting. All profiles saved in this way will also be stored in the preset 'User Presets' NOTE: For multiple processes involving audio normalization and those for saving audio streams from movies, only the data from the first file in the list will be considered. FIXME have any problem with xml escapes in special character (like && for ffmpeg double pass), so there is some to get around it (escamotage), but work . """ if cmd_opt["Normalize"]: if wx.MessageBox( _("Audio normalization is a specific process " "applied track by track.\n\n" "Are you sure to proceed ?"), _('Videomass: Audio normalization enabled!'), wx.ICON_QUESTION | wx.YES_NO, None) == wx.NO: return #Se L'utente risponde no else: normalize = cmd_opt["Normalize"][ 0] # tengo il primo valore lista else: normalize = '' if self.ckb_onlynorm.IsChecked(): command = ("-vn %s" % normalize) command = ' '.join(command.split()) # sistemo gli spazi list = [command, cmd_opt["ExportExt"]] elif self.cmbx_a.GetValue() == _("Save audio from movie"): command = ("-vn %s" % cmd_opt["AudioCodec"][0]) command = ' '.join(command.split()) # sistemo gli spazi list = [command, cmd_opt["ExportExt"][0]] else: command = ("-vn %s %s %s %s %s %s" % ( normalize, cmd_opt["AudioCodec"], cmd_opt["AudioBitrate"][1], cmd_opt["AudioDepth"][1], cmd_opt["AudioRate"][1], cmd_opt["AudioChannel"][1], )) command = ' '.join(command.split()) # sistemo gli spazi list = [command, cmd_opt["ExportExt"]] filename = 'preset-v1-Personal' # nome del file preset senza ext name_preset = 'User Profiles' full_pathname = '%s/.videomass/preset-v1-Personal.vdms' % dirname prstdlg = presets_addnew.MemPresets( self, 'addprofile', full_pathname, filename, list, _('Videomass: Create a new profile on "%s" preset') % (name_preset)) prstdlg.ShowModal()
def Editprof(self, event): """ A choice in the list (profile) can be edit in all own part. The list is reloaded automatically after pressed save button in the dialog. """ if array == []: self.parent.statusbar_msg(_("Select a profile in the list " "before to edit profile itself"), yellow) return else: filename = dict_presets[self.cmbx_prst.GetValue()][0] name_preset = dict_presets[self.cmbx_prst.GetValue()][1] full_pathname = '%s%s.vdms' % (self.path_confdir, filename) prstdialog = presets_addnew.MemPresets(self, 'edit', full_pathname, filename, array, _('Edit profile on "%s" preset: ') % (name_preset) ) ret = prstdialog.ShowModal() if ret == wx.ID_OK: self.reset_list() # re-charging list_ctrl with newer
def Addprof(self): """ Store new profiles in the selected preset """ filename = self.cmbx_prst.GetValue() t = _('Create a new profile on "%s" preset') % filename prstdialog = presets_addnew.MemPresets(self, 'newprofile', filename, None, t) ret = prstdialog.ShowModal() if ret == wx.ID_OK: self.reset_list() # re-charging list_ctrl with newer
def Addprof(self): """ Store new profiles in the same presets selected in the combobox. The list is reloaded automatically after pressed ok button in the dialog for update view. """ filename = self.cmbx_prst.GetValue() t = _('Create a new profile on the selected preset "%s"') % filename prstdialog = presets_addnew.MemPresets(self, 'newprofile', filename, None, t) ret = prstdialog.ShowModal() if ret == wx.ID_OK: self.reset_list() # re-charging list_ctrl with newer
def Addprof(self): """ Storing new profile in the 'Preset Manager' panel with the same current setting. All profiles saved in this way will also be stored in the preset 'User Presets' NOTE: For multiple processes involving audio normalization and those for saving audio streams from movies, only the data from the first file in the list will be considered. FIXME have any problem with xml escapes in special character (like && for ffmpeg double pass), so there is some to get around it (escamotage), but work . """ get = wx.GetApp() dirconf = os.path.join(get.DIRconf, 'vdms') if cmd_opt["PEAK"]: normalize = cmd_opt["PEAK"][0] # tengo il primo valore lista elif cmd_opt["RMS"]: normalize = cmd_opt["RMS"][0] # tengo il primo valore lista else: normalize = '' command = ("-vn %s %s %s %s %s %s %s" % ( normalize, cmd_opt["AudioCodec"], cmd_opt["AudioBitrate"][1], cmd_opt["AudioDepth"][1], cmd_opt["AudioRate"][1], cmd_opt["AudioChannel"][1], self.threads, )) param = [' '.join(command.split()), '', cmd_opt["ExportExt"]] filename = 'User Profiles' t = _('Videomass: Create a new profile on "User Profiles" preset') prstdlg = presets_addnew.MemPresets( self, 'addprofile', filename, param, t, ) prstdlg.ShowModal()
def Addprof(self): """ Store new profiles in the same presets selected in the combobox. The list is reloaded automatically after pressed ok button in the dialog for update view. """ filename = dict_presets[self.cmbx_prst.GetValue()][0] name_preset = dict_presets[self.cmbx_prst.GetValue()][1] full_pathname = '%s%s.vdms' % (self.path_confdir, filename) prstdialog = presets_addnew.MemPresets(self, 'newprofile', full_pathname, filename, None, _('Create a new ' 'profile on the selected "%s" preset') % ( name_preset) ) ret = prstdialog.ShowModal() if ret == wx.ID_OK: self.reset_list() # re-charging list_ctrl with newer
def Editprof(self, event): """ Edit an existing profile """ if array == []: self.parent.statusbar_msg(_("First select a profile in the list"), yellow) return else: filename = self.cmbx_prst.GetValue() t = _('Edit profile of the "%s" preset: ') % (filename) prstdialog = presets_addnew.MemPresets( self, 'edit', filename, array, t, ) ret = prstdialog.ShowModal() if ret == wx.ID_OK: self.reset_list() # re-charging list_ctrl with newer
def Editprof(self, event): """ A choice in the list (profile) can be edit in all own part. The list is reloaded automatically after pressed save button in the dialog. """ if array == []: self.parent.statusbar_msg(_("First select a profile in the list"), yellow) return else: filename = self.cmbx_prst.GetValue() t = _('Edit profile on "%s" preset: ') % (filename) prstdialog = presets_addnew.MemPresets( self, 'edit', filename, array, t, ) ret = prstdialog.ShowModal() if ret == wx.ID_OK: self.reset_list() # re-charging list_ctrl with newer