forked from openlp/openlp
Fix easislides import when xml elements are missing
This commit is contained in:
parent
59280d10b7
commit
6c3190528d
@ -73,15 +73,21 @@ class EasiSlidesImport(SongImport):
|
|||||||
def _parse_song(self, song):
|
def _parse_song(self, song):
|
||||||
self._success = True
|
self._success = True
|
||||||
self._add_unicode_attribute(u'title', song.Title1, True)
|
self._add_unicode_attribute(u'title', song.Title1, True)
|
||||||
self._add_unicode_attribute(u'alternate_title', song.Title2)
|
if hasattr(song, u'Title2'):
|
||||||
self._add_unicode_attribute(u'song_number', song.SongNumber)
|
self._add_unicode_attribute(u'alternate_title', song.Title2)
|
||||||
|
if hasattr(song, u'SongNumber'):
|
||||||
|
self._add_unicode_attribute(u'song_number', song.SongNumber)
|
||||||
if self.song_number == u'0':
|
if self.song_number == u'0':
|
||||||
self.song_number = u''
|
self.song_number = u''
|
||||||
self._add_authors(song)
|
self._add_authors(song)
|
||||||
self._add_copyright(song.Copyright)
|
if hasattr(song, u'Copyright'):
|
||||||
self._add_copyright(song.LicenceAdmin1)
|
self._add_copyright(song.Copyright)
|
||||||
self._add_copyright(song.LicenceAdmin2)
|
if hasattr(song, u'LicenceAdmin1'):
|
||||||
self._add_unicode_attribute(u'song_book_name', song.BookReference)
|
self._add_copyright(song.LicenceAdmin1)
|
||||||
|
if hasattr(song, u'LicenceAdmin2'):
|
||||||
|
self._add_copyright(song.LicenceAdmin2)
|
||||||
|
if hasattr(song, u'BookReference'):
|
||||||
|
self._add_unicode_attribute(u'song_book_name', song.BookReference)
|
||||||
self._parse_and_add_lyrics(song)
|
self._parse_and_add_lyrics(song)
|
||||||
if self._success:
|
if self._success:
|
||||||
if not self.finish():
|
if not self.finish():
|
||||||
|
Loading…
Reference in New Issue
Block a user