forked from openlp/openlp
Fix #249 on tracker, exception on opensong files with verse name containing only number [1]
This commit is contained in:
parent
a3ddb50479
commit
bbba7203e3
@ -184,10 +184,11 @@ class VerseType(object):
|
||||
verse_index = VerseType.from_translated_string(verse_name)
|
||||
if verse_index is None:
|
||||
verse_index = VerseType.from_string(verse_name)
|
||||
if verse_index is None:
|
||||
verse_index = VerseType.from_translated_tag(verse_name)
|
||||
if verse_index is None:
|
||||
verse_index = VerseType.from_tag(verse_name)
|
||||
elif len(verse_name) == 1:
|
||||
if verse_index is None:
|
||||
verse_index = VerseType.from_translated_tag(verse_name)
|
||||
if verse_index is None:
|
||||
verse_index = VerseType.from_tag(verse_name)
|
||||
return verse_index
|
||||
|
||||
def retrieve_windows_encoding(recommendation=None):
|
||||
|
@ -191,6 +191,8 @@ class OpenSongImport(SongImport):
|
||||
verse_tag = content
|
||||
verse_num = u'1'
|
||||
verse_index = VerseType.from_loose_input(verse_tag)
|
||||
if not verse_index:
|
||||
verse_index = 0 # Verse
|
||||
verse_tag = VerseType.Tags[verse_index]
|
||||
inst = 1
|
||||
if [verse_tag, verse_num, inst] in our_verse_order \
|
||||
|
Loading…
Reference in New Issue
Block a user