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,6 +184,7 @@ class VerseType(object):
|
|||||||
verse_index = VerseType.from_translated_string(verse_name)
|
verse_index = VerseType.from_translated_string(verse_name)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_string(verse_name)
|
verse_index = VerseType.from_string(verse_name)
|
||||||
|
elif len(verse_name) == 1:
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
verse_index = VerseType.from_translated_tag(verse_name)
|
verse_index = VerseType.from_translated_tag(verse_name)
|
||||||
if verse_index is None:
|
if verse_index is None:
|
||||||
|
@ -191,6 +191,8 @@ class OpenSongImport(SongImport):
|
|||||||
verse_tag = content
|
verse_tag = content
|
||||||
verse_num = u'1'
|
verse_num = u'1'
|
||||||
verse_index = VerseType.from_loose_input(verse_tag)
|
verse_index = VerseType.from_loose_input(verse_tag)
|
||||||
|
if not verse_index:
|
||||||
|
verse_index = 0 # Verse
|
||||||
verse_tag = VerseType.Tags[verse_index]
|
verse_tag = VerseType.Tags[verse_index]
|
||||||
inst = 1
|
inst = 1
|
||||||
if [verse_tag, verse_num, inst] in our_verse_order \
|
if [verse_tag, verse_num, inst] in our_verse_order \
|
||||||
|
Loading…
Reference in New Issue
Block a user