diff --git a/openlp/core/ui/media/webkitplayer.py b/openlp/core/ui/media/webkitplayer.py index 4524d4cc7..19221ace0 100644 --- a/openlp/core/ui/media/webkitplayer.py +++ b/openlp/core/ui/media/webkitplayer.py @@ -178,7 +178,7 @@ class WebkitPlayer(MediaPlayer): vol = 0 path = controller.media_info.file_info.absoluteFilePath() display.web_view.setVisible(True) - js = 'show_video("load", "%s", %s, %s);' % (path.replace('\\', '\\\\'), str(vol)) + js = 'show_video("load", "{path}", {vol});'.format(path=path.replace('\\', '\\\\'), vol=str(vol)) display.frame.evaluateJavaScript(js) return True diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index d18914411..2ec733629 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -465,8 +465,9 @@ class ThemeForm(QtWidgets.QWizard, Ui_ThemeWizard, RegistryProperties): """ visible_formats = '(%s)' % '; '.join(VIDEO_EXT) actual_formats = '(%s)' % ' '.join(VIDEO_EXT) - video_filter = '%s %s %s' % (translate('OpenLP', 'Video Files'), visible_formats, actual_formats) - video_filter = '%s;;%s (*.*)' % (video_filter, UiStrings().AllFiles) + video_filter = '{trans} {visible} {actual}'.format(trans=translate('OpenLP', 'Video Files'), + visible=visible_formats, actual=actual_formats) + video_filter = '{video};;{ui} (*.*)'.format(video=video_filter, ui=UiStrings().AllFiles) filename, filter_used = QtWidgets.QFileDialog.getOpenFileName( self, translate('OpenLP.ThemeWizard', 'Select Video'), self.video_file_edit.text(), video_filter)