This commit is contained in:
Tim Bentley 2019-01-04 20:11:12 +00:00
parent 953f0bae34
commit 392bfba099
8 changed files with 15 additions and 16 deletions

View File

@ -30,7 +30,7 @@ Some of the code for this form is based on the examples at:
import html
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.applocation import AppLocation

View File

@ -474,7 +474,7 @@ class MediaController(RegistryBase, LogMixin, RegistryProperties):
file = str(file)
if suffix in player.video_extensions_list:
if not controller.media_info.is_background or controller.media_info.is_background and \
player.can_background:
player.can_background:
self.resize(display, player)
if player.load(display, file):
self.current_media_players[controller.controller_type] = player

View File

@ -201,7 +201,7 @@ class PlayerTab(SettingsTab):
"""
if 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
settings = Settings()
settings.beginGroup(self.settings_section)
@ -219,13 +219,13 @@ class PlayerTab(SettingsTab):
settings.beginGroup(self.settings_section)
settings.setValue('background color', self.background_color)
settings.endGroup()
old_players, override_player = get_media_players()
if self.used_players != old_players:
# clean old Media stuff
set_media_players(self.used_players, override_player)
self.settings_form.register_post_process('mediaitem_suffix_reset')
self.settings_form.register_post_process('mediaitem_media_rebuild')
self.settings_form.register_post_process('config_screen_changed')
# old_players, override_player = get_media_players()
# if self.used_players != old_players:
# # clean old Media stuff
# set_media_players(self.used_players, override_player)
# self.settings_form.register_post_process('mediaitem_suffix_reset')
# self.settings_form.register_post_process('mediaitem_media_rebuild')
# self.settings_form.register_post_process('config_screen_changed')
def post_set_up(self, post_update=False):
"""

View File

@ -641,8 +641,8 @@ class SongMediaItem(MediaManagerItem):
service_item.background_audio = [m.file_path for m in song.media_files]
service_item.set_media_length(total_length)
service_item.metadata.append('<em>{label}:</em> {media}'.
format(label=translate('SongsPlugin.MediaItem', 'Media'),
media=service_item.background_audio))
format(label=translate('SongsPlugin.MediaItem', 'Media'),
media=service_item.background_audio))
else:
critical_error_message_box(
translate('SongsPlugin.MediaItem', 'Missing Audio Software'),

View File

@ -103,7 +103,7 @@ class JenkinsTrigger(object):
job_info = self.server.get_job_info(job_name)
self.jobs[job_name] = job_info
self.jobs[job_name]['nextBuildUrl'] = '{url}{nextBuildNumber}/'.format(**job_info)
except:
except Exception:
pass
def trigger_build(self):

View File

@ -113,7 +113,7 @@ class TestState(TestCase, TestMixin):
def test_basic_preconditions_fail(self):
# GIVEN a new state
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
State().add_service("test", 1, 1, PluginStatus.Inactive)

View File

@ -432,7 +432,6 @@ class TestMediaItem(TestCase, TestMixin):
song.authors_songs = []
song.songbook_entries = []
song.ccli_number = ''
# song.topics = None
book1 = MagicMock()
book1.name = 'My songbook'
book2 = MagicMock()

View File

@ -64,7 +64,7 @@ class TestMainWindow(TestCase, TestMixin):
patch('openlp.core.ui.mainwindow.ProjectorManager'), \
patch('openlp.core.ui.mainwindow.websockets.WebSocketServer'), \
patch('openlp.core.ui.mainwindow.PluginForm'), \
patch('openlp.core.ui.mainwindow.server.HttpServer'):
patch('openlp.core.ui.mainwindow.server.HttpServer'):
self.main_window = MainWindow()
def tearDown(self):