forked from openlp/openlp
pep8
This commit is contained in:
parent
953f0bae34
commit
392bfba099
@ -30,7 +30,7 @@ Some of the code for this form is based on the examples at:
|
|||||||
import html
|
import html
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtWidgets, QtWebKit, QtWebKitWidgets, QtGui, QtMultimedia
|
from PyQt5 import QtCore, QtWidgets, QtWebKit, QtWebKitWidgets, QtGui
|
||||||
|
|
||||||
from openlp.core.common import is_macosx, is_win
|
from openlp.core.common import is_macosx, is_win
|
||||||
from openlp.core.common.applocation import AppLocation
|
from openlp.core.common.applocation import AppLocation
|
||||||
|
@ -474,7 +474,7 @@ class MediaController(RegistryBase, LogMixin, RegistryProperties):
|
|||||||
file = str(file)
|
file = str(file)
|
||||||
if suffix in player.video_extensions_list:
|
if suffix in player.video_extensions_list:
|
||||||
if not controller.media_info.is_background or controller.media_info.is_background and \
|
if not controller.media_info.is_background or controller.media_info.is_background and \
|
||||||
player.can_background:
|
player.can_background:
|
||||||
self.resize(display, player)
|
self.resize(display, player)
|
||||||
if player.load(display, file):
|
if player.load(display, file):
|
||||||
self.current_media_players[controller.controller_type] = player
|
self.current_media_players[controller.controller_type] = player
|
||||||
|
@ -201,7 +201,7 @@ class PlayerTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
if self.saved_used_players:
|
if self.saved_used_players:
|
||||||
self.used_players = self.saved_used_players
|
self.used_players = self.saved_used_players
|
||||||
self.used_players = get_media_players()[0]
|
# self.used_players = get_media_players()[0]
|
||||||
self.saved_used_players = self.used_players
|
self.saved_used_players = self.used_players
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
settings.beginGroup(self.settings_section)
|
settings.beginGroup(self.settings_section)
|
||||||
@ -219,13 +219,13 @@ class PlayerTab(SettingsTab):
|
|||||||
settings.beginGroup(self.settings_section)
|
settings.beginGroup(self.settings_section)
|
||||||
settings.setValue('background color', self.background_color)
|
settings.setValue('background color', self.background_color)
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
old_players, override_player = get_media_players()
|
# old_players, override_player = get_media_players()
|
||||||
if self.used_players != old_players:
|
# if self.used_players != old_players:
|
||||||
# clean old Media stuff
|
# # clean old Media stuff
|
||||||
set_media_players(self.used_players, override_player)
|
# set_media_players(self.used_players, override_player)
|
||||||
self.settings_form.register_post_process('mediaitem_suffix_reset')
|
# self.settings_form.register_post_process('mediaitem_suffix_reset')
|
||||||
self.settings_form.register_post_process('mediaitem_media_rebuild')
|
# self.settings_form.register_post_process('mediaitem_media_rebuild')
|
||||||
self.settings_form.register_post_process('config_screen_changed')
|
# self.settings_form.register_post_process('config_screen_changed')
|
||||||
|
|
||||||
def post_set_up(self, post_update=False):
|
def post_set_up(self, post_update=False):
|
||||||
"""
|
"""
|
||||||
|
@ -641,8 +641,8 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
service_item.background_audio = [m.file_path for m in song.media_files]
|
service_item.background_audio = [m.file_path for m in song.media_files]
|
||||||
service_item.set_media_length(total_length)
|
service_item.set_media_length(total_length)
|
||||||
service_item.metadata.append('<em>{label}:</em> {media}'.
|
service_item.metadata.append('<em>{label}:</em> {media}'.
|
||||||
format(label=translate('SongsPlugin.MediaItem', 'Media'),
|
format(label=translate('SongsPlugin.MediaItem', 'Media'),
|
||||||
media=service_item.background_audio))
|
media=service_item.background_audio))
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
translate('SongsPlugin.MediaItem', 'Missing Audio Software'),
|
translate('SongsPlugin.MediaItem', 'Missing Audio Software'),
|
||||||
|
@ -103,7 +103,7 @@ class JenkinsTrigger(object):
|
|||||||
job_info = self.server.get_job_info(job_name)
|
job_info = self.server.get_job_info(job_name)
|
||||||
self.jobs[job_name] = job_info
|
self.jobs[job_name] = job_info
|
||||||
self.jobs[job_name]['nextBuildUrl'] = '{url}{nextBuildNumber}/'.format(**job_info)
|
self.jobs[job_name]['nextBuildUrl'] = '{url}{nextBuildNumber}/'.format(**job_info)
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def trigger_build(self):
|
def trigger_build(self):
|
||||||
|
@ -113,7 +113,7 @@ class TestState(TestCase, TestMixin):
|
|||||||
def test_basic_preconditions_fail(self):
|
def test_basic_preconditions_fail(self):
|
||||||
# GIVEN a new state
|
# GIVEN a new state
|
||||||
State().load_settings()
|
State().load_settings()
|
||||||
plugin = Registry().register('test_plugin', MagicMock())
|
Registry().register('test_plugin', MagicMock())
|
||||||
|
|
||||||
# WHEN I add a new services with dependencies and a failed pre condition
|
# WHEN I add a new services with dependencies and a failed pre condition
|
||||||
State().add_service("test", 1, 1, PluginStatus.Inactive)
|
State().add_service("test", 1, 1, PluginStatus.Inactive)
|
||||||
|
@ -432,7 +432,6 @@ class TestMediaItem(TestCase, TestMixin):
|
|||||||
song.authors_songs = []
|
song.authors_songs = []
|
||||||
song.songbook_entries = []
|
song.songbook_entries = []
|
||||||
song.ccli_number = ''
|
song.ccli_number = ''
|
||||||
# song.topics = None
|
|
||||||
book1 = MagicMock()
|
book1 = MagicMock()
|
||||||
book1.name = 'My songbook'
|
book1.name = 'My songbook'
|
||||||
book2 = MagicMock()
|
book2 = MagicMock()
|
||||||
|
@ -64,7 +64,7 @@ class TestMainWindow(TestCase, TestMixin):
|
|||||||
patch('openlp.core.ui.mainwindow.ProjectorManager'), \
|
patch('openlp.core.ui.mainwindow.ProjectorManager'), \
|
||||||
patch('openlp.core.ui.mainwindow.websockets.WebSocketServer'), \
|
patch('openlp.core.ui.mainwindow.websockets.WebSocketServer'), \
|
||||||
patch('openlp.core.ui.mainwindow.PluginForm'), \
|
patch('openlp.core.ui.mainwindow.PluginForm'), \
|
||||||
patch('openlp.core.ui.mainwindow.server.HttpServer'):
|
patch('openlp.core.ui.mainwindow.server.HttpServer'):
|
||||||
self.main_window = MainWindow()
|
self.main_window = MainWindow()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user