forked from openlp/openlp
Try to get ccli number even if there is text in the field
This commit is contained in:
parent
b993af2e90
commit
e8c7547ab2
@ -147,10 +147,10 @@ class SongShowPlusImport(SongImport):
|
|||||||
elif block_key == COPYRIGHT:
|
elif block_key == COPYRIGHT:
|
||||||
self.add_copyright(self.decode(data))
|
self.add_copyright(self.decode(data))
|
||||||
elif block_key == CCLI_NO:
|
elif block_key == CCLI_NO:
|
||||||
try:
|
# Try to get the CCLI number even if the field contains additional text
|
||||||
self.ccli_number = int(data)
|
match = re.search(r'\d+', self.decode(data))
|
||||||
except ValueError:
|
if match:
|
||||||
continue
|
self.ccli_number = int(match.group())
|
||||||
elif block_key == VERSE:
|
elif block_key == VERSE:
|
||||||
self.add_verse(self.decode(data), "%s%s" % (VerseType.tags[VerseType.Verse], verse_no))
|
self.add_verse(self.decode(data), "%s%s" % (VerseType.tags[VerseType.Verse], verse_no))
|
||||||
elif block_key == CHORUS:
|
elif block_key == CHORUS:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
"Martin Luther"
|
"Martin Luther"
|
||||||
],
|
],
|
||||||
|
"ccli_number": 12456,
|
||||||
"comments": "",
|
"comments": "",
|
||||||
"copyright": "Public Domain",
|
"copyright": "Public Domain",
|
||||||
"song_number": 0,
|
"song_number": 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user