diff --git a/openlp/plugins/songs/lib/importers/videopsalm.py b/openlp/plugins/songs/lib/importers/videopsalm.py index 8976326a6..36a28c583 100644 --- a/openlp/plugins/songs/lib/importers/videopsalm.py +++ b/openlp/plugins/songs/lib/importers/videopsalm.py @@ -65,8 +65,8 @@ class VideoPsalmImport(SongImport): if c == '\n': if inside_quotes: processed_content += '\\n' - # Put keys in quotes - elif c.isalnum() and not inside_quotes: + # Put keys in quotes. The '-' is for handling nagative numbers + elif (c.isalnum() or c == '-') and not inside_quotes: processed_content += '"' + c c = next(file_content_it) while c.isalnum(): @@ -121,6 +121,8 @@ class VideoPsalmImport(SongImport): if 'Memo3' in song: self.add_comment(song['Memo3']) for verse in song['Verses']: + if 'Text' not in verse: + continue self.add_verse(verse['Text'], 'v') if not self.finish(): self.log_error('Could not import {title}'.format(title=self.title)) diff --git a/tests/resources/videopsalmsongs/videopsalm-as-safe-a-stronghold.json b/tests/resources/videopsalmsongs/videopsalm-as-safe-a-stronghold.json index d3e9296c7..707ef4c42 100644 --- a/tests/resources/videopsalmsongs/videopsalm-as-safe-a-stronghold.json +++ b/tests/resources/videopsalmsongs/videopsalm-as-safe-a-stronghold.json @@ -1,4 +1,4 @@ -{Abbreviation:"SB1",Copyright:"Public domain",Songs:[{ID:3,Composer:"Unknown",Author:"Martin Luther",Copyright:"Public +{Abbreviation:"SB1",Copyright:"Public domain",Songs:[{ID:3,Composer:"Unknown",Author:"Martin Luther",Capo:-1,Copyright:"Public Domain",Theme:"tema1 tema2",CCLI:"12345",Alias:"A safe stronghold",Memo1:"This is the first comment