For worshipassistant add a default verse-id for lyrics to use if none is given. Fixes bug 1458056.

Fixes: https://launchpad.net/bugs/1458056
This commit is contained in:
Tomas Groth 2015-05-25 12:11:04 +01:00
parent a07b8a8f49
commit 4266d9cbdf
4 changed files with 56 additions and 0 deletions

View File

@ -131,6 +131,7 @@ class WorshipAssistantImport(SongImport):
return
verse = ''
used_verses = []
verse_id = VerseType.tags[VerseType.Verse] + '1'
for line in lyrics.splitlines():
if line.startswith('['): # verse marker
# Add previous verse

View File

@ -49,3 +49,5 @@ class TestWorshipAssistantFileImport(SongImportTestHelper):
self.load_external_result_data(os.path.join(TEST_PATH, 'would_you_be_free.json')))
self.file_import(os.path.join(TEST_PATH, 'would_you_be_free2.csv'),
self.load_external_result_data(os.path.join(TEST_PATH, 'would_you_be_free.json')))
self.file_import(os.path.join(TEST_PATH, 'lift_up_your_heads.csv'),
self.load_external_result_data(os.path.join(TEST_PATH, 'lift_up_your_heads.json')))

View File

@ -0,0 +1,40 @@
"SongID","SongNr","Title","Author","Copyright","FirstLine","PriKey","AltKey","Tempo","Focus","Theme","Scripture","Active","Songbook","TimeSig","Introduced","LastUsed","TimesUsed","CCLINr","User1","User2","User3","User4","User5","Roadmap","Overmap","FileLink1","FileLink2","Updated","Lyrics","Info","Lyrics2","Background"
"000013ab-0000-0000-0000-000000000000","0","Lift Up Your Heads"," Bryan Mierau","Public Domain","Lift up your heads and the doors","Em","NULL","NULL","NULL","NULL","NULL","1","1","NULL","NULL","NULL","0","NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL","2004-04-07 06:36:18.952",".Em D C D
Lift up your heads and the doors of your heart
. Am B7 Em
And the King of glory will come in
(Repeat)
.G Am D
Who is this King of Glory?
. B7 Em
The Lord strong and mighty!
.G Am D
Who is this King of Glory?
. B7
The Lord, mighty in battle!
.G Am D
Who is this King of Glory?
.B7 Em
Jesus our Messiah!
.G Am D
Who is this King of Glory?
.B7 Em
Jesus, Lord of Lords!
","NULL","Lift up your heads and the doors of your heart
And the King of glory will come in
(Repeat)
Who is this King of Glory?
The Lord strong and mighty!
Who is this King of Glory?
The Lord, mighty in battle!
Who is this King of Glory?
Jesus our Messiah!
Who is this King of Glory?
Jesus, Lord of Lords!
","NULL"
1 SongID SongNr Title Author Copyright FirstLine PriKey AltKey Tempo Focus Theme Scripture Active Songbook TimeSig Introduced LastUsed TimesUsed CCLINr User1 User2 User3 User4 User5 Roadmap Overmap FileLink1 FileLink2 Updated Lyrics Info Lyrics2 Background
2 000013ab-0000-0000-0000-000000000000 0 Lift Up Your Heads Bryan Mierau Public Domain Lift up your heads and the doors Em NULL NULL NULL NULL NULL 1 1 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 2004-04-07 06:36:18.952 .Em D C D Lift up your heads and the doors of your heart . Am B7 Em And the King of glory will come in (Repeat) .G Am D Who is this King of Glory? . B7 Em The Lord strong and mighty! .G Am D Who is this King of Glory? . B7 The Lord, mighty in battle! .G Am D Who is this King of Glory? .B7 Em Jesus our Messiah! .G Am D Who is this King of Glory? .B7 Em Jesus, Lord of Lords! NULL Lift up your heads and the doors of your heart And the King of glory will come in (Repeat) Who is this King of Glory? The Lord strong and mighty! Who is this King of Glory? The Lord, mighty in battle! Who is this King of Glory? Jesus our Messiah! Who is this King of Glory? Jesus, Lord of Lords! NULL

View File

@ -0,0 +1,13 @@
{
"authors": [
"Bryan Mierau"
],
"title": "Lift Up Your Heads",
"verse_order_list": [],
"verses": [
[
"Lift up your heads and the doors of your heart\nAnd the King of glory will come in\n(Repeat)\n\nWho is this King of Glory?\nThe Lord strong and mighty!\nWho is this King of Glory?\nThe Lord, mighty in battle!\n\nWho is this King of Glory?\nJesus our Messiah!\nWho is this King of Glory?\nJesus, Lord of Lords!\n",
"v1"
]
]
}