forked from openlp/openlp
Fix song order in SongshowPlus import
bzr-revno: 1393
This commit is contained in:
commit
5b7c909444
@ -154,7 +154,8 @@ class SongShowPlusImport(SongImport):
|
|||||||
elif blockKey == COMMENTS:
|
elif blockKey == COMMENTS:
|
||||||
self.comments = unicode(data, u'cp1252')
|
self.comments = unicode(data, u'cp1252')
|
||||||
elif blockKey == VERSE_ORDER:
|
elif blockKey == VERSE_ORDER:
|
||||||
verseTag = self.toOpenLPVerseTag(data)
|
verseTag = self.toOpenLPVerseTag(data, True)
|
||||||
|
if verseTag:
|
||||||
self.sspVerseOrderList.append(unicode(verseTag,
|
self.sspVerseOrderList.append(unicode(verseTag,
|
||||||
u'cp1252'))
|
u'cp1252'))
|
||||||
elif blockKey == SONG_BOOK:
|
elif blockKey == SONG_BOOK:
|
||||||
@ -174,7 +175,7 @@ class SongShowPlusImport(SongImport):
|
|||||||
WizardStrings.ImportingType % file_name)
|
WizardStrings.ImportingType % file_name)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def toOpenLPVerseTag(self, verseName):
|
def toOpenLPVerseTag(self, verseName, ignoreUnique=False):
|
||||||
if verseName.find(" ") != -1:
|
if verseName.find(" ") != -1:
|
||||||
verseParts = verseName.split(" ")
|
verseParts = verseName.split(" ")
|
||||||
verseType = verseParts[0]
|
verseType = verseParts[0]
|
||||||
@ -195,6 +196,8 @@ class SongShowPlusImport(SongImport):
|
|||||||
verseTag = "B"
|
verseTag = "B"
|
||||||
else:
|
else:
|
||||||
if not self.otherList.has_key(verseName):
|
if not self.otherList.has_key(verseName):
|
||||||
|
if ignoreUnique:
|
||||||
|
return None
|
||||||
self.otherCount = self.otherCount + 1
|
self.otherCount = self.otherCount + 1
|
||||||
self.otherList[verseName] = str(self.otherCount)
|
self.otherList[verseName] = str(self.otherCount)
|
||||||
verseTag = "O"
|
verseTag = "O"
|
||||||
|
Loading…
Reference in New Issue
Block a user