forked from openlp/openlp
Fix #912 by using the correct argument; Also fix the tests on macOS (and now my machine) where some version of libxml2 has an error that causes syntax errors in the resulting XML
This commit is contained in:
parent
f469f0b55b
commit
bd6dfb43be
@ -594,7 +594,7 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties, LogMixin):
|
||||
# multiple service items?
|
||||
if self.single_service_item:
|
||||
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:
|
||||
items = self.list_view.selectedIndexes()
|
||||
drop_position = self.service_manager.get_drop_position()
|
||||
|
@ -675,8 +675,10 @@ class OpenLyrics(object):
|
||||
"""
|
||||
text = ''
|
||||
# Convert lxml.objectify to lxml.etree representation.
|
||||
lines = etree.tostring(lines)
|
||||
element = etree.XML(lines)
|
||||
string_lines = etree.tostring(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.
|
||||
if version > '0.7':
|
||||
|
Loading…
Reference in New Issue
Block a user