Merge lp:~trb143/openlp/more_media into lp:openlp

Proposed by Tim Bentley
Status: Superseded
Proposed branch: lp:~trb143/openlp/more_media
Merge into: lp:openlp
Diff against target: 573 lines (+86/-100)
12 files modified
openlp/core/common/settings.py (+1/-0)
openlp/core/ui/__init__.py (+1/-1)
openlp/core/ui/generaltab.py (+7/-0)
openlp/core/ui/media/mediacontroller.py (+9/-12)
openlp/core/ui/media/mediaplayer.py (+3/-2)
openlp/core/ui/media/mediatab.py (+34/-37)
openlp/core/ui/media/vlcplayer.py (+11/-8)
openlp/core/ui/settingsform.py (+4/-7)
openlp/core/ui/slidecontroller.py (+2/-4)
openlp/core/ui/thememanager.py (+4/-10)
openlp/plugins/media/lib/mediaitem.py (+1/-11)
tests/functional/openlp_core/ui/media/test_vlcplayer.py (+9/-8)
To merge this branch: bzr merge lp:~trb143/openlp/more_media
Reviewer Review Type Date Requested Status
OpenLP Core Pending
Review via email: mp+366335@code.launchpad.net

This proposal has been superseded by a proposal from 2019-04-21.

Commit message

Media plays successfully and cleanups.
Added VLC additions

Description of the change

Media now plays, stops, seeks and repeats.
Media Tab now works but needs more love.
VLC addtitions is now added and usable.
Experimental flag added to UI. Set this and it may go bang. You will need to edit settings manually to release this!
Add code (provided by tgc and superfly) to get media components. Works fine outside OpenLP but takes out OpenLP on Fedora 30. Activate by using experimental and restart.
Fixed the imagemanager bug on saving themes. Now works except preview image is black!
Removed many bits of commented out code.

To post a comment you must log in.
Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Linux tests passed!

Revision history for this message
Raoul Snyman (raoul-snyman) wrote :

Linting failed, please see https://ci.openlp.io/job/MP-03-Linting/76/ for more details

lp:~trb143/openlp/more_media updated
2859. By Ken Roberts

PJLink2 Update V1

2860. By Ken Roberts

PJLink2 Update V02

2861. By Ken Roberts

PJLink2 Update V03

2862. By Bastian Germann

Change OpenLP's license to GPLv3 or later

2863. By Tomas Groth

Make it possible to specify the portable path to use for OpenLP Data when in portable mode. This is very useful during development.

2864. By Bastian Germann

Add PyMuPDF as additional PDF controller and missing mupdf file formats

2865. By Ken Roberts

PJLink2 update V04

2866. By Tim Bentley

Make media play again and VLC arguments

2867. By Phill

Just to trigger the tests :-)

2868. By Ken Roberts

PJLink2 Update v05

2869. By Ken Roberts

PJLink2 Update v06

2870. By Tim Bentley

media.vendor.vlc has been removed and python3-vlc installed in its place.

2871. By Ken Roberts

PJLink 2 Update v07

2872. By Phill

rework json handling for custom objects and refactor path file

2873. By Raoul Snyman

For now, this is a bit of a work-in-progress. This code should pick up the bundled libvlc.(dll|so|dylib) and use it. VLC detection seems to be a little iffy right now.

2874. By Phill

refactor media extensions

2875. By Tomas Groth

Make it possible to go to next or previous service item when stepping through a presentation. Disables impress and powerpoint presentation console.

2876. By Bastian Germann

Sync dependencies in setup.py and check_dependencies; replacing nose2 with pytest

2877. By Tim Bentley

Head

2878. By Tim Bentley

fix up media for breakages

2879. By Tim Bentley

updates

2880. By Tim Bentley

Head

2881. By Tim Bentley

streaming works

2882. By Tim Bentley

Fix streaming part1

2883. By Tim Bentley

Fix streaming part1

2884. By Tim Bentley

colon

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openlp/core/common/settings.py'
2--- openlp/core/common/settings.py 2019-04-09 17:21:35 +0000
3+++ openlp/core/common/settings.py 2019-04-21 12:49:34 +0000
4@@ -213,6 +213,7 @@
5 'images/background color': '#000000',
6 'media/media auto start': QtCore.Qt.Unchecked,
7 'media/stream command': '',
8+ 'media/vlc additions': '',
9 'remotes/download version': '0.0',
10 'players/background color': '#000000',
11 'servicemanager/last directory': None,
12
13=== modified file 'openlp/core/ui/__init__.py'
14--- openlp/core/ui/__init__.py 2019-02-14 15:09:09 +0000
15+++ openlp/core/ui/__init__.py 2019-04-21 12:49:34 +0000
16@@ -93,4 +93,4 @@
17 self.resizeRowsToContents()
18
19
20-__all__ = ['SingleColumnTableWidget']
21+__all__ = ['SingleColumnTableWidget', 'DisplayControllerType']
22
23=== modified file 'openlp/core/ui/generaltab.py'
24--- openlp/core/ui/generaltab.py 2019-03-16 10:20:46 +0000
25+++ openlp/core/ui/generaltab.py 2019-04-21 12:49:34 +0000
26@@ -113,6 +113,9 @@
27 self.check_for_updates_check_box = QtWidgets.QCheckBox(self.startup_group_box)
28 self.check_for_updates_check_box.setObjectName('check_for_updates_check_box')
29 self.startup_layout.addWidget(self.check_for_updates_check_box)
30+ self.experimental_check_box = QtWidgets.QCheckBox(self.startup_group_box)
31+ self.experimental_check_box.setObjectName('experimental_check_box')
32+ self.startup_layout.addWidget(self.experimental_check_box)
33 self.right_layout.addWidget(self.startup_group_box)
34 # Logo
35 self.logo_group_box = QtWidgets.QGroupBox(self.right_column)
36@@ -180,6 +183,8 @@
37 self.logo_file_label.setText(translate('OpenLP.GeneralTab', 'Logo file:'))
38 self.logo_hide_on_startup_check_box.setText(translate('OpenLP.GeneralTab', 'Don\'t show logo on startup'))
39 self.check_for_updates_check_box.setText(translate('OpenLP.GeneralTab', 'Check for updates to OpenLP'))
40+ self.experimental_check_box.setText(translate('OpenLP.GeneralTab',
41+ 'Experimental features (use at your own risk)'))
42 self.settings_group_box.setTitle(translate('OpenLP.GeneralTab', 'Application Settings'))
43 self.save_check_service_check_box.setText(translate('OpenLP.GeneralTab',
44 'Prompt to save before starting a new service'))
45@@ -222,6 +227,7 @@
46 self.logo_hide_on_startup_check_box.setChecked(settings.value('logo hide on startup'))
47 self.logo_color_button.color = self.logo_background_color
48 self.check_for_updates_check_box.setChecked(settings.value('update check'))
49+ self.experimental_check_box.setChecked(settings.value('experimental'))
50 self.auto_preview_check_box.setChecked(settings.value('auto preview'))
51 self.timeout_spin_box.setValue(settings.value('loop delay'))
52 self.start_paused_check_box.setChecked(settings.value('audio start paused'))
53@@ -241,6 +247,7 @@
54 settings.setValue('logo file', self.logo_file_path_edit.path)
55 settings.setValue('logo hide on startup', self.logo_hide_on_startup_check_box.isChecked())
56 settings.setValue('update check', self.check_for_updates_check_box.isChecked())
57+ settings.setValue('experimental', self.experimental_check_box.isChecked())
58 settings.setValue('save prompt', self.save_check_service_check_box.isChecked())
59 settings.setValue('auto unblank', self.auto_unblank_check_box.isChecked())
60 settings.setValue('click live slide to unblank', self.click_live_slide_to_unblank_check_box.isChecked())
61
62=== modified file 'openlp/core/ui/media/mediacontroller.py'
63--- openlp/core/ui/media/mediacontroller.py 2019-04-12 16:37:45 +0000
64+++ openlp/core/ui/media/mediacontroller.py 2019-04-21 12:49:34 +0000
65@@ -20,8 +20,7 @@
66 # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
67 ###############################################################################
68 """
69-The :mod:`~openlp.core.ui.media.mediacontroller` module contains a base class for media components and other widgets
70-related to playing media, such as sliders.
71+The :mod:`~openlp.core.ui.media.mediacontroller` module is the control module for all media playing.
72 """
73 import logging
74
75@@ -124,14 +123,14 @@
76 """
77 self.setup()
78 self.vlc_player = VlcPlayer(self)
79- State().add_service("mediacontroller", 0)
80- State().add_service("media_live", 0, requires="mediacontroller")
81+ State().add_service('mediacontroller', 0)
82+ State().add_service('media_live', 0)
83 if get_vlc() and pymediainfo_available:
84- State().update_pre_conditions("mediacontroller", True)
85+ State().update_pre_conditions('mediacontroller', True)
86 State().update_pre_conditions('media_live', True)
87 else:
88- State().missing_text("mediacontroller", translate('OpenLP.SlideController',
89- "VLC or pymediainfo are missing, so you are unable to play any media"))
90+ State().missing_text('media_live', translate('OpenLP.SlideController',
91+ 'VLC or pymediainfo are missing, so you are unable to play any media'))
92 self._generate_extensions_lists()
93 return True
94
95@@ -144,6 +143,8 @@
96 self.setup_display(self.live_controller.display, False)
97 except AttributeError:
98 State().update_pre_conditions('media_live', False)
99+ State().missing_text('media_live', translate('OpenLP.SlideController',
100+ 'No Displays configure so Live Media has been disabled'))
101 self.setup_display(self.preview_controller.preview_display, True)
102
103 def display_controllers(self, controller_type):
104@@ -215,9 +216,6 @@
105 """
106 # Generic controls
107 controller.mediabar.setVisible(value)
108- # if controller.is_live and controller.display:
109- # if self.current_media_players and value:
110- # controller.display.set_transparency(False)
111
112 @staticmethod
113 def resize(display, player):
114@@ -563,8 +561,7 @@
115 total_seconds = controller.media_info.length // 1000
116 total_minutes = total_seconds // 60
117 total_seconds %= 60
118- controller.position_label.setText(' %02d:%02d / %02d:%02d' %
119- (0, 0, total_minutes, total_seconds))
120+ controller.position_label.setText(' %02d:%02d / %02d:%02d' % (0, 0, total_minutes, total_seconds))
121 controller.mediabar.actions['playbackPlay'].setVisible(True)
122 controller.mediabar.actions['playbackStop'].setDisabled(True)
123 controller.mediabar.actions['playbackPause'].setVisible(False)
124
125=== modified file 'openlp/core/ui/media/mediaplayer.py'
126--- openlp/core/ui/media/mediaplayer.py 2019-03-24 07:53:19 +0000
127+++ openlp/core/ui/media/mediaplayer.py 2019-04-21 12:49:34 +0000
128@@ -139,11 +139,12 @@
129 """
130 pass
131
132- def update_ui(self, display):
133+ def update_ui(self, controller, output_display):
134 """
135 Do some ui related stuff (e.g. update the seek slider)
136
137- :param display: The display to be updated.
138+ :param controller: Which Controller is running the show.
139+ :param output_display: The display where the media is
140 """
141 pass
142
143
144=== modified file 'openlp/core/ui/media/mediatab.py'
145--- openlp/core/ui/media/mediatab.py 2019-04-09 17:32:10 +0000
146+++ openlp/core/ui/media/mediatab.py 2019-04-21 12:49:34 +0000
147@@ -20,11 +20,11 @@
148 # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
149 ###############################################################################
150 """
151-The :mod:`~openlp.core.ui.media.playertab` module holds the configuration tab for the media stuff.
152+The :mod:`~openlp.core.ui.media.mediatab` module holds the configuration tab for the media stuff.
153 """
154
155 from PyQt5 import QtWidgets
156-# from PyQt5.QtMultimedia import QCameraInfo, QAudioDeviceInfo, QAudio
157+from PyQt5.QtMultimedia import QCameraInfo, QAudioDeviceInfo, QAudio
158
159 from openlp.core.common import is_linux, is_win
160 from openlp.core.common.i18n import translate
161@@ -32,8 +32,9 @@
162 from openlp.core.lib.settingstab import SettingsTab
163 from openlp.core.ui.icons import UiIcons
164
165-LINUX_STREAM = 'v4l2:///dev/video0'
166-WIN_STREAM = 'dshow:// :dshow-vdev='
167+LINUX_STREAM = 'v4l2://{video} :v4l2-standard= :input-slave={audio} :live-caching=300'
168+WIN_STREAM = 'dshow://:dshow-vdev={video} :dshow-adev={audio} :live-caching=300'
169+OSX_STREAM = 'avcapture://{video} :qtsound://{audio} :live-caching=300'
170
171
172 class MediaTab(SettingsTab):
173@@ -44,8 +45,6 @@
174 """
175 Constructor
176 """
177- # self.media_players = Registry().get('media_controller').media_players
178- # self.saved_used_players = None
179 self.icon_path = UiIcons().video
180 player_translated = translate('OpenLP.MediaTab', 'Media')
181 super(MediaTab, self).__init__(parent, 'Media', player_translated)
182@@ -67,7 +66,7 @@
183 self.stream_media_group_box = QtWidgets.QGroupBox(self.left_column)
184 self.stream_media_group_box.setObjectName('stream_media_group_box')
185 self.stream_media_layout = QtWidgets.QHBoxLayout(self.stream_media_group_box)
186- self.stream_media_layout.setObjectName('live_media_layout')
187+ self.stream_media_layout.setObjectName('stream_media_layout')
188 self.stream_media_layout.setContentsMargins(0, 0, 0, 0)
189 self.stream_edit = QtWidgets.QPlainTextEdit(self)
190 self.stream_media_layout.addWidget(self.stream_edit)
191@@ -75,19 +74,28 @@
192 self.browse_button.setIcon(UiIcons().undo)
193 self.stream_media_layout.addWidget(self.browse_button)
194 self.left_layout.addWidget(self.stream_media_group_box)
195- self.left_layout.addWidget(self.stream_media_group_box)
196+ self.vlc_additions_group_box = QtWidgets.QGroupBox(self.left_column)
197+ self.vlc_additions_group_box.setObjectName('vlc_additions_group_box')
198+ self.vlc_additions_layout = QtWidgets.QHBoxLayout(self.vlc_additions_group_box)
199+ self.vlc_additions_layout.setObjectName('vlc_additions_layout')
200+ self.vlc_additions_layout.setContentsMargins(0, 0, 0, 0)
201+ self.vlc_additions_edit = QtWidgets.QPlainTextEdit(self)
202+ self.vlc_additions_layout.addWidget(self.vlc_additions_edit)
203+ self.vlc_additions_layout.addWidget(self.browse_button)
204+ self.left_layout.addWidget(self.vlc_additions_group_box)
205 self.left_layout.addStretch()
206 self.right_layout.addStretch()
207 # # Signals and slots
208 self.browse_button.clicked.connect(self.on_revert)
209
210- def retranslateUi(self):
211+ def retranslate_ui(self):
212 """
213 Translate the UI on the fly
214 """
215 self.live_media_group_box.setTitle(translate('MediaPlugin.MediaTab', 'Live Media'))
216 self.stream_media_group_box.setTitle(translate('MediaPlugin.MediaTab', 'Stream Media Command'))
217- self.auto_start_check_box.setText(translate('MediaPlugin.MediaTab', 'Start automatically'))
218+ self.vlc_additions_group_box.setTitle(translate('MediaPlugin.MediaTab', 'VLC additional commands'))
219+ self.auto_start_check_box.setText(translate('MediaPlugin.MediaTab', 'Start Live items automatically'))
220
221 def load(self):
222 """
223@@ -100,6 +108,20 @@
224 self.stream_edit.setPlainText(LINUX_STREAM)
225 elif is_win:
226 self.stream_edit.setPlainText(WIN_STREAM)
227+ else:
228+ self.stream_edit.setPlainText(OSX_STREAM)
229+ self.vlc_additions_edit.setPlainText(Settings().value(self.settings_section + '/vlc additions'))
230+ if Settings().value('core/experimental'):
231+ print('Video input:')
232+ for cam in QCameraInfo.availableCameras():
233+ print('===============')
234+ print(cam.deviceName())
235+ print(cam.description())
236+ print()
237+ print('Audio input:')
238+ for au in QAudioDeviceInfo.availableDevices(QAudio.AudioInput):
239+ print('===============')
240+ print(au.deviceName())
241
242 def save(self):
243 """
244@@ -108,17 +130,8 @@
245 setting_key = self.settings_section + '/media auto start'
246 if Settings().value(setting_key) != self.auto_start_check_box.checkState():
247 Settings().setValue(setting_key, self.auto_start_check_box.checkState())
248- # settings = Settings()
249- # settings.beginGroup(self.settings_section)
250- # settings.setValue('background color', self.background_color)
251- # settings.endGroup()
252- # old_players, override_player = get_media_players()
253- # if self.used_players != old_players:
254- # # clean old Media stuff
255- # set_media_players(self.used_players, override_player)
256- # self.settings_form.register_post_process('mediaitem_suffix_reset')
257- # self.settings_form.register_post_process('mediaitem_media_rebuild')
258- # self.settings_form.register_post_process('config_screen_changed')
259+ Settings().setValue(self.settings_section + '/stream command', self.stream_edit.toPlainText())
260+ Settings().setValue(self.settings_section + '/vlc additions', self.vlc_additions_edit.toPlainText())
261
262 def post_set_up(self, post_update=False):
263 """
264@@ -127,22 +140,6 @@
265 :param post_update: Indicates if called before or after updates.
266 """
267 pass
268- # for key, player in self.media_players.items():
269- # player = self.media_players[key]
270- # checkbox = MediaQCheckBox(self.media_player_group_box)
271- # checkbox.setEnabled(player.available)
272- # checkbox.setObjectName(player.name + '_check_box')
273- # checkbox.setToolTip(player.get_info())
274- # checkbox.set_player_name(player.name)
275- # self.player_check_boxes[player.name] = checkbox
276- # checkbox.stateChanged.connect(self.on_player_check_box_changed)
277- # self.media_player_layout.addWidget(checkbox)
278- # if player.available and player.name in self.used_players:
279- # checkbox.setChecked(True)
280- # else:
281- # checkbox.setChecked(False)
282- # self.update_player_list()
283- # self.retranslate_players()
284
285 def on_revert(self):
286 pass
287
288=== modified file 'openlp/core/ui/media/vlcplayer.py'
289--- openlp/core/ui/media/vlcplayer.py 2019-04-08 17:19:18 +0000
290+++ openlp/core/ui/media/vlcplayer.py 2019-04-21 12:49:34 +0000
291@@ -164,9 +164,11 @@
292 output_display.vlc_widget = QtWidgets.QFrame(output_display)
293 output_display.vlc_widget.setFrameStyle(QtWidgets.QFrame.NoFrame)
294 # creating a basic vlc instance
295- command_line_options = '--no-video-title-show'
296+ command_line_options = '--no-video-title-show '
297 if Settings().value('advanced/hide mouse') and live_display:
298- command_line_options += ' --mouse-hide-timeout=0'
299+ command_line_options += '--mouse-hide-timeout=0 '
300+ if Settings().value('media/vlc additions'):
301+ command_line_options += Settings().value('media/vlc additions')
302 output_display.vlc_instance = vlc.Instance(command_line_options)
303 # creating an empty vlc media player
304 output_display.vlc_media_player = output_display.vlc_instance.media_player_new()
305@@ -224,7 +226,8 @@
306 return False
307 output_display.vlc_media = audio_cd_tracks.item_at_index(controller.media_info.title_track)
308 elif controller.media_info.media_type == MediaType.Stream:
309- output_display.vlc_media = output_display.vlc_instance.media_new_location('ZZZZZZ')
310+ stream_cmd = Settings().value('media/stream command')
311+ output_display.vlc_media = output_display.vlc_instance.media_new_location(stream_cmd)
312 else:
313 output_display.vlc_media = output_display.vlc_instance.media_new_path(path)
314 # put the media in the media player
315@@ -240,7 +243,7 @@
316 Wait no longer than 60 seconds. (loading an iso file needs a long time)
317
318 :param media_state: The state of the playing media
319- :param display: The display where the media is
320+ :param output_display: The display where the media is
321 :return:
322 """
323 vlc = get_vlc()
324@@ -314,7 +317,7 @@
325 self.volume(output_display, output_display.media_info.volume)
326 if start_time > 0 and output_display.vlc_media_player.is_seekable():
327 output_display.vlc_media_player.set_time(int(start_time))
328- controller.seek_slider.setMaximum(output_display.media_info.length)
329+ controller.seek_slider.setMaximum(controller.media_info.length)
330 self.set_state(MediaState.Playing, output_display)
331 output_display.vlc_widget.raise_()
332 return True
333@@ -361,9 +364,9 @@
334 :param seek_value: The position of where a seek goes to
335 :param output_display: The display where the media is
336 """
337- if output_display.controller.media_info.media_type == MediaType.CD \
338- or output_display.controller.media_info.media_type == MediaType.DVD:
339- seek_value += int(output_display.controller.media_info.start_time)
340+ if output_display.media_info.media_type == MediaType.CD \
341+ or output_display.media_info.media_type == MediaType.DVD:
342+ seek_value += int(output_display.media_info.start_time)
343 if output_display.vlc_media_player.is_seekable():
344 output_display.vlc_media_player.set_time(seek_value)
345
346
347=== modified file 'openlp/core/ui/settingsform.py'
348--- openlp/core/ui/settingsform.py 2019-04-09 17:21:35 +0000
349+++ openlp/core/ui/settingsform.py 2019-04-21 12:49:34 +0000
350@@ -30,7 +30,6 @@
351 from openlp.core.api.tab import ApiTab
352 from openlp.core.common.mixins import RegistryProperties
353 from openlp.core.common.registry import Registry
354-from openlp.core.common.settings import Settings
355 from openlp.core.lib import build_icon
356 from openlp.core.projectors.tab import ProjectorTab
357 from openlp.core.ui.advancedtab import AdvancedTab
358@@ -61,6 +60,7 @@
359 self.setting_list_widget.currentRowChanged.connect(self.list_item_changed)
360 self.general_tab = None
361 self.themes_tab = None
362+ self.player_tab = None
363 self.projector_tab = None
364 self.advanced_tab = None
365 self.api_tab = None
366@@ -79,8 +79,7 @@
367 self.insert_tab(self.advanced_tab)
368 self.insert_tab(self.screens_tab)
369 self.insert_tab(self.themes_tab)
370- if Settings().value('core/experimental'):
371- self.insert_tab(self.player_tab)
372+ self.insert_tab(self.player_tab)
373 self.insert_tab(self.projector_tab)
374 self.insert_tab(self.api_tab)
375 for plugin in State().list_plugins():
376@@ -161,8 +160,7 @@
377 self.themes_tab = ThemesTab(self)
378 self.projector_tab = ProjectorTab(self)
379 self.advanced_tab = AdvancedTab(self)
380- if Settings().value('core/experimental'):
381- self.player_tab = MediaTab(self)
382+ self.player_tab = MediaTab(self)
383 self.api_tab = ApiTab(self)
384 self.screens_tab = ScreensTab(self)
385 except Exception as e:
386@@ -170,8 +168,7 @@
387 self.general_tab.post_set_up()
388 self.themes_tab.post_set_up()
389 self.advanced_tab.post_set_up()
390- if Settings().value('core/experimental'):
391- self.player_tab.post_set_up()
392+ self.player_tab.post_set_up()
393 self.api_tab.post_set_up()
394 for plugin in State().list_plugins():
395 if plugin.settings_tab:
396
397=== modified file 'openlp/core/ui/slidecontroller.py'
398--- openlp/core/ui/slidecontroller.py 2019-03-24 07:53:19 +0000
399+++ openlp/core/ui/slidecontroller.py 2019-04-21 12:49:34 +0000
400@@ -112,7 +112,7 @@
401
402 class InfoLabel(QtWidgets.QLabel):
403 """
404- InfoLabel is a subclassed QLabel. Created to provide the ablilty to add a ellipsis if the text is cut off. Original
405+ InfoLabel is a subclassed QLabel. Created to provide the ability to add a ellipsis if the text is cut off. Original
406 source: https://stackoverflow.com/questions/11446478/pyside-pyqt-truncate-text-in-qlabel-based-on-minimumsize
407 """
408
409@@ -177,7 +177,6 @@
410 if screen.is_display:
411 display = DisplayWindow(self, screen)
412 self.displays.append(display)
413- # display.media_watcher.progress.connect(self.on_audio_time_remaining)
414
415 @property
416 def display(self):
417@@ -381,7 +380,7 @@
418 self.position_label.setMinimumSize(90, 0)
419 self.position_label.setObjectName('position_label')
420 self.mediabar.add_toolbar_widget(self.position_label)
421- # Build the seek_slider.
422+ # Build the media seek_slider.
423 self.seek_slider = MediaSlider(QtCore.Qt.Horizontal, self, self)
424 self.seek_slider.setMaximum(1000)
425 self.seek_slider.setTracking(True)
426@@ -398,7 +397,6 @@
427 self.volume_slider.setMaximum(100)
428 self.volume_slider.setTracking(True)
429 self.volume_slider.setToolTip(translate('OpenLP.SlideController', 'Audio Volume.'))
430- # self.volume_slider.setValue(self.media_info.volume)
431 self.volume_slider.setGeometry(QtCore.QRect(90, 160, 221, 24))
432 self.volume_slider.setObjectName('volume_slider')
433 self.mediabar.add_toolbar_widget(self.volume_slider)
434
435=== modified file 'openlp/core/ui/thememanager.py'
436--- openlp/core/ui/thememanager.py 2019-03-10 21:01:39 +0000
437+++ openlp/core/ui/thememanager.py 2019-04-21 12:49:34 +0000
438@@ -26,19 +26,18 @@
439 import zipfile
440 from xml.etree.ElementTree import XML, ElementTree
441
442-from PyQt5 import QtCore, QtGui, QtWidgets
443+from PyQt5 import QtCore, QtWidgets
444
445 from openlp.core.common import delete_file
446 from openlp.core.common.applocation import AppLocation
447 from openlp.core.common.i18n import UiStrings, get_locale_key, translate
448 from openlp.core.common.mixins import LogMixin, RegistryProperties
449-from openlp.core.common.path import Path, copyfile, create_paths, path_to_str
450+from openlp.core.common.path import Path, copyfile, create_paths
451 from openlp.core.common.registry import Registry, RegistryBase
452 from openlp.core.common.settings import Settings
453-from openlp.core.lib import ImageSource, build_icon, check_item_selected, create_thumb, get_text_file_string, \
454- validate_thumb
455+from openlp.core.lib import build_icon, check_item_selected, create_thumb, get_text_file_string, validate_thumb
456 from openlp.core.lib.exceptions import ValidationError
457-from openlp.core.lib.theme import BackgroundType, Theme
458+from openlp.core.lib.theme import Theme
459 from openlp.core.lib.ui import create_widget_action, critical_error_message_box
460 from openlp.core.ui.filerenameform import FileRenameForm
461 from openlp.core.ui.icons import UiIcons
462@@ -648,11 +647,6 @@
463 :rtype: None
464 """
465 self._write_theme(theme, image_source_path, image_destination_path)
466- if theme.background_type == BackgroundType.to_string(BackgroundType.Image):
467- self.image_manager.update_image_border(path_to_str(theme.background_filename),
468- ImageSource.Theme,
469- QtGui.QColor(theme.background_border_color))
470- self.image_manager.process_updates()
471
472 def _write_theme(self, theme, image_source_path=None, image_destination_path=None):
473 """
474
475=== modified file 'openlp/plugins/media/lib/mediaitem.py'
476--- openlp/plugins/media/lib/mediaitem.py 2019-04-09 16:47:23 +0000
477+++ openlp/plugins/media/lib/mediaitem.py 2019-04-21 12:49:34 +0000
478@@ -93,16 +93,6 @@
479 to another language.
480 """
481 self.on_new_prompt = translate('MediaPlugin.MediaItem', 'Select Media')
482- # self.replace_action.setText(UiStrings().ReplaceBG)
483- # self.replace_action_context.setText(UiStrings().ReplaceBG)
484- # self.replace_action.setToolTip(UiStrings().ReplaceLiveBGDisabled)
485- # self.replace_action_context.setToolTip(UiStrings().ReplaceLiveBGDisabled)
486- # self.reset_action.setText(UiStrings().ResetBG)
487- # self.reset_action.setToolTip(UiStrings().ResetLiveBG)
488- # self.reset_action_context.setText(UiStrings().ResetBG)
489- # self.reset_action_context.setToolTip(UiStrings().ResetLiveBG)
490- # self.automatic = UiStrings().Automatic
491- # self.display_type_label.setText(translate('MediaPlugin.MediaItem', 'Use Player:'))
492
493 def required_icons(self):
494 """
495@@ -117,7 +107,7 @@
496 self.can_make_live = False
497 self.can_add_to_service = False
498 if State().check_preconditions('media_live'):
499- self.can_make_live = False
500+ self.can_make_live = True
501
502 def add_list_view_to_toolbar(self):
503 """
504
505=== modified file 'tests/functional/openlp_core/ui/media/test_vlcplayer.py'
506--- tests/functional/openlp_core/ui/media/test_vlcplayer.py 2019-03-27 18:59:03 +0000
507+++ tests/functional/openlp_core/ui/media/test_vlcplayer.py 2019-04-21 12:49:34 +0000
508@@ -126,7 +126,7 @@
509 mocked_is_macosx.return_value = False
510 mocked_is_win.return_value = False
511 mocked_settings = MagicMock()
512- mocked_settings.value.return_value = True
513+ mocked_settings.value.return_value = ''
514 MockedSettings.return_value = mocked_settings
515 mocked_qframe = MagicMock()
516 mocked_qframe.winId.return_value = 2
517@@ -150,8 +150,9 @@
518 # THEN: The VLC widget should be set up correctly
519 assert mocked_output_display.vlc_widget == mocked_qframe
520 mocked_qframe.setFrameStyle.assert_called_with(1)
521- mocked_settings.value.assert_called_with('advanced/hide mouse')
522- mocked_vlc.Instance.assert_called_with('--no-video-title-show --mouse-hide-timeout=0')
523+ mocked_settings.value.assert_any_call('advanced/hide mouse')
524+ mocked_settings.value.assert_any_call('media/vlc additions')
525+ mocked_vlc.Instance.assert_called_with('--no-video-title-show ')
526 assert mocked_output_display.vlc_instance == mocked_instance
527 mocked_instance.media_player_new.assert_called_with()
528 assert mocked_output_display.vlc_media_player == mocked_media_player_new
529@@ -175,7 +176,7 @@
530 mocked_is_macosx.return_value = False
531 mocked_is_win.return_value = False
532 mocked_settings = MagicMock()
533- mocked_settings.value.return_value = True
534+ mocked_settings.value.return_value = ''
535 MockedSettings.return_value = mocked_settings
536 mocked_qframe = MagicMock()
537 mocked_qframe.winId.return_value = 2
538@@ -197,7 +198,7 @@
539 vlc_player.setup(mocked_output_display, mocked_controller)
540
541 # THEN: The VLC instance should be created with the correct options
542- mocked_vlc.Instance.assert_called_with('--no-video-title-show --mouse-hide-timeout=0')
543+ mocked_vlc.Instance.assert_called_with('--no-video-title-show ')
544
545 @patch('openlp.core.ui.media.vlcplayer.is_win')
546 @patch('openlp.core.ui.media.vlcplayer.is_macosx')
547@@ -213,7 +214,7 @@
548 mocked_is_macosx.return_value = False
549 mocked_is_win.return_value = False
550 mocked_settings = MagicMock()
551- mocked_settings.value.return_value = False
552+ mocked_settings.value.return_value = ''
553 MockedSettings.return_value = mocked_settings
554 mocked_qframe = MagicMock()
555 mocked_qframe.winId.return_value = 2
556@@ -235,7 +236,7 @@
557 vlc_player.setup(mocked_output_display, mocked_controller)
558
559 # THEN: The VLC instance should be created with the correct options
560- mocked_vlc.Instance.assert_called_with('--no-video-title-show')
561+ mocked_vlc.Instance.assert_called_with('--no-video-title-show ')
562
563 @patch('openlp.core.ui.media.vlcplayer.is_win')
564 @patch('openlp.core.ui.media.vlcplayer.is_macosx')
565@@ -863,7 +864,7 @@
566
567 # THEN: nothing should happen
568 mocked_display.vlc_media_player.is_seekable.assert_called_with()
569- mocked_display.vlc_media_player.set_time.assert_called_with(5000)
570+ mocked_display.vlc_media_player.set_time.assert_called_with(2000)
571
572 def test_reset(self):
573 """