forked from openlp/openlp
Correct problem it tags not being used on song load
This commit is contained in:
commit
88c09d8981
@ -87,6 +87,7 @@ class ServiceItem(object):
|
||||
if plugin:
|
||||
self.renderer = plugin.renderer
|
||||
self.name = plugin.name
|
||||
self.from_service = False if plugin else False
|
||||
self.title = u''
|
||||
self.shortname = u''
|
||||
self.audit = u''
|
||||
@ -115,7 +116,6 @@ class ServiceItem(object):
|
||||
self.start_time = 0
|
||||
self.end_time = 0
|
||||
self.media_length = 0
|
||||
self.from_service = False
|
||||
self.image_border = u'#000000'
|
||||
self.background_audio = []
|
||||
self._new_item()
|
||||
|
@ -660,14 +660,16 @@ class ServiceManager(QtGui.QWidget):
|
||||
for item in items:
|
||||
self.mainwindow.incrementProgressBar()
|
||||
serviceItem = ServiceItem()
|
||||
serviceItem.from_service = True
|
||||
serviceItem.renderer = self.mainwindow.renderer
|
||||
serviceItem.set_from_service(item, self.servicePath)
|
||||
self.validateItem(serviceItem)
|
||||
self.addServiceItem(serviceItem, repaint=False)
|
||||
if serviceItem.is_capable(ItemCapabilities.OnLoadUpdate):
|
||||
Receiver.send_message(u'%s_service_load' %
|
||||
serviceItem.name.lower(), serviceItem)
|
||||
# if the item has been processed
|
||||
if serviceItem._uuid == self.loadItem_uuid:
|
||||
serviceItem.edit_id = int(self.loadItem_editId)
|
||||
self.addServiceItem(serviceItem, repaint=False)
|
||||
delete_file(p_file)
|
||||
self.setFileName(fileName)
|
||||
self.mainwindow.addRecentFile(fileName)
|
||||
@ -1124,6 +1126,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
Triggered from plugins to update service items.
|
||||
"""
|
||||
editId, uuid = message.split(u':')
|
||||
self.loadItem_uuid = uuid
|
||||
self.loadItem_editId = editId
|
||||
for item in self.serviceItems:
|
||||
if item[u'service_item']._uuid == uuid:
|
||||
item[u'service_item'].edit_id = int(editId)
|
||||
|
@ -510,7 +510,8 @@ class SongMediaItem(MediaManagerItem):
|
||||
# Add the audio file to the service item.
|
||||
if len(song.media_files) > 0:
|
||||
service_item.add_capability(ItemCapabilities.HasBackgroundAudio)
|
||||
service_item.background_audio = [m.file_name for m in song.media_files]
|
||||
service_item.background_audio = \
|
||||
[m.file_name for m in song.media_files]
|
||||
return True
|
||||
|
||||
def serviceLoad(self, item):
|
||||
|
Loading…
Reference in New Issue
Block a user