Fix bug 1310523

This commit is contained in:
Samuel Mehrbrodt 2014-05-03 14:56:58 +02:00
parent fe52d50619
commit 8b76dcc216

View File

@ -310,9 +310,9 @@ class OpenLyrics(object):
verse_tag = verse[0]['type'][0].lower() verse_tag = verse[0]['type'][0].lower()
verse_number = verse[0]['label'] verse_number = verse[0]['label']
verse_def = verse_tag + verse_number verse_def = verse_tag + verse_number
verse_tags.append(verse_def)
# Create the letter from the number of duplicates # Create the letter from the number of duplicates
verse[0]['suffix'] = chr(96 + verse_tags.count(verse_def)) verse[0][u'suffix'] = chr(97 + (verse_tags.count(verse_def) % 26))
verse_tags.append(verse_def)
# If the verse tag is a duplicate use the suffix letter # If the verse tag is a duplicate use the suffix letter
for verse in verse_list: for verse in verse_list:
verse_tag = verse[0]['type'][0].lower() verse_tag = verse[0]['type'][0].lower()