forked from openlp/openlp
fixed importer
This commit is contained in:
parent
186ca920da
commit
372a3cd4ef
@ -134,7 +134,7 @@ class SongShowPlusImport(SongImport):
|
|||||||
log.debug(length_descriptor_size)
|
log.debug(length_descriptor_size)
|
||||||
data = song_data.read(length_descriptor)
|
data = song_data.read(length_descriptor)
|
||||||
if block_key == TITLE:
|
if block_key == TITLE:
|
||||||
self.title = unicode(data, u'cp1252')
|
self.title = data
|
||||||
elif block_key == AUTHOR:
|
elif block_key == AUTHOR:
|
||||||
authors = data.split(" / ")
|
authors = data.split(" / ")
|
||||||
for author in authors:
|
for author in authors:
|
||||||
@ -143,19 +143,19 @@ class SongShowPlusImport(SongImport):
|
|||||||
author = authorParts[1] + " " + authorParts[0]
|
author = authorParts[1] + " " + authorParts[0]
|
||||||
self.parse_author(unicode(author, u'cp1252'))
|
self.parse_author(unicode(author, u'cp1252'))
|
||||||
elif block_key == COPYRIGHT:
|
elif block_key == COPYRIGHT:
|
||||||
self.addCopyright(unicode(data, u'cp1252'))
|
self.addCopyright(data)
|
||||||
elif block_key == CCLI_NO:
|
elif block_key == CCLI_NO:
|
||||||
self.ccliNumber = int(data)
|
self.ccliNumber = int(data)
|
||||||
elif block_key == VERSE:
|
elif block_key == VERSE:
|
||||||
self.addVerse(unicode(data, u'cp1252'), "%s%s" % (VerseType.tags[VerseType.Verse], verse_no))
|
self.addVerse(data, "%s%s" % (VerseType.tags[VerseType.Verse], verse_no))
|
||||||
elif block_key == CHORUS:
|
elif block_key == CHORUS:
|
||||||
self.addVerse(unicode(data, u'cp1252'), "%s%s" % (VerseType.tags[VerseType.Chorus], verse_no))
|
self.addVerse(data, "%s%s" % (VerseType.tags[VerseType.Chorus], verse_no))
|
||||||
elif block_key == BRIDGE:
|
elif block_key == BRIDGE:
|
||||||
self.addVerse(unicode(data, u'cp1252'), "%s%s" % (VerseType.tags[VerseType.Bridge], verse_no))
|
self.addVerse(data, "%s%s" % (VerseType.tags[VerseType.Bridge], verse_no))
|
||||||
elif block_key == TOPIC:
|
elif block_key == TOPIC:
|
||||||
self.topics.append(unicode(data, u'cp1252'))
|
self.topics.append(data)
|
||||||
elif block_key == COMMENTS:
|
elif block_key == COMMENTS:
|
||||||
self.comments = unicode(data, u'cp1252')
|
self.comments = data
|
||||||
elif block_key == VERSE_ORDER:
|
elif block_key == VERSE_ORDER:
|
||||||
verse_tag = self.to_openlp_verse_tag(data, True)
|
verse_tag = self.to_openlp_verse_tag(data, True)
|
||||||
if verse_tag:
|
if verse_tag:
|
||||||
@ -163,12 +163,12 @@ class SongShowPlusImport(SongImport):
|
|||||||
verse_tag = unicode(verse_tag, u'cp1252')
|
verse_tag = unicode(verse_tag, u'cp1252')
|
||||||
self.ssp_verse_order_list.append(verse_tag)
|
self.ssp_verse_order_list.append(verse_tag)
|
||||||
elif block_key == SONG_BOOK:
|
elif block_key == SONG_BOOK:
|
||||||
self.songBookName = unicode(data, u'cp1252')
|
self.songBookName = data
|
||||||
elif block_key == SONG_NUMBER:
|
elif block_key == SONG_NUMBER:
|
||||||
self.songNumber = ord(data)
|
self.songNumber = ord(data)
|
||||||
elif block_key == CUSTOM_VERSE:
|
elif block_key == CUSTOM_VERSE:
|
||||||
verse_tag = self.to_openlp_verse_tag(verse_name)
|
verse_tag = self.to_openlp_verse_tag(verse_name)
|
||||||
self.addVerse(unicode(data, u'cp1252'), verse_tag)
|
self.addVerse(data, verse_tag)
|
||||||
else:
|
else:
|
||||||
log.debug("Unrecognised blockKey: %s, data: %s" % (block_key, data))
|
log.debug("Unrecognised blockKey: %s, data: %s" % (block_key, data))
|
||||||
song_data.seek(next_block_starts)
|
song_data.seek(next_block_starts)
|
||||||
|
Loading…
Reference in New Issue
Block a user