Merge branch 'issue-912-fix-bibles-images' into 'master'

Use the correct argument when adding service items remotely

Closes #912

See merge request openlp/openlp!359
This commit is contained in:
Tim Bentley 2021-09-06 07:13:04 +00:00
commit 5496745f98
2 changed files with 5 additions and 3 deletions

View File

@ -594,7 +594,7 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties, LogMixin):
# multiple service items? # multiple service items?
if self.single_service_item: if self.single_service_item:
self.log_debug('{plugin} Add requested'.format(plugin=self.plugin.name)) self.log_debug('{plugin} Add requested'.format(plugin=self.plugin.name))
self.add_to_service(replace=self.remote_triggered) self.add_to_service(remote=self.remote_triggered)
else: else:
items = self.list_view.selectedIndexes() items = self.list_view.selectedIndexes()
drop_position = self.service_manager.get_drop_position() drop_position = self.service_manager.get_drop_position()

View File

@ -675,8 +675,10 @@ class OpenLyrics(object):
""" """
text = '' text = ''
# Convert lxml.objectify to lxml.etree representation. # Convert lxml.objectify to lxml.etree representation.
lines = etree.tostring(lines) string_lines = etree.tostring(lines)
element = etree.XML(lines) # lxml 4.6.x or some recent version of libxml2 seems to add the left-over tags in
string_lines = string_lines.replace('</verse>', '').replace('</lyrics>', '').replace('</song>')
element = etree.XML(string_lines)
# OpenLyrics 0.8 uses <br/> for new lines. Append text from "lines" element to verse text. # OpenLyrics 0.8 uses <br/> for new lines. Append text from "lines" element to verse text.
if version > '0.7': if version > '0.7':