forked from openlp/openlp
service fixes
This commit is contained in:
parent
a4cfd2cdda
commit
29f7d8967f
@ -498,8 +498,6 @@ class MediaController(RegistryBase, LogMixin, RegistryProperties):
|
||||
:param controller: The media controller.
|
||||
:return: True if setup succeeded else False.
|
||||
"""
|
||||
if controller is None:
|
||||
controller = self.display_controllers[DisplayControllerType.Plugin]
|
||||
# stop running videos
|
||||
self.media_reset(controller)
|
||||
# Setup media info
|
||||
|
@ -350,7 +350,10 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
||||
if modified:
|
||||
self.service_id += 1
|
||||
self._modified = modified
|
||||
service_file = self.short_file_name() or translate('OpenLP.ServiceManager', 'Untitled Service')
|
||||
if self._service_path:
|
||||
service_file = self._service_path.name
|
||||
else:
|
||||
service_file = translate('OpenLP.ServiceManager', 'Untitled Service')
|
||||
self.main_window.set_service_modified(modified, service_file)
|
||||
|
||||
def is_modified(self):
|
||||
@ -367,7 +370,7 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
||||
:rtype: None
|
||||
"""
|
||||
self._service_path = file_path
|
||||
self.main_window.set_service_modified(self.is_modified(), self.short_file_name())
|
||||
self.main_window.set_service_modified(self.is_modified(), file_path.name)
|
||||
Settings().setValue('servicemanager/last file', file_path)
|
||||
if file_path and file_path.suffix == '.oszl':
|
||||
self._save_lite = True
|
||||
|
@ -269,7 +269,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
service_item.add_from_command(filename, name, CLAPPERBOARD)
|
||||
service_item.title = clip_name
|
||||
# Set the length
|
||||
self.media_controller.media_setup_optical(name, title, audio_track, subtitle_track, start, end, None, None)
|
||||
#self.media_controller.media_setup_optical(name, title, audio_track, subtitle_track, start, end, None, None)
|
||||
service_item.set_media_length((end - start) / 1000)
|
||||
service_item.start_time = start / 1000
|
||||
service_item.end_time = end / 1000
|
||||
|
Loading…
Reference in New Issue
Block a user