From 07ffb7c0d0ea8604b78aabe6057f0802e11c6aca Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sun, 3 Mar 2019 13:32:31 +0000 Subject: [PATCH] Fix choruses, bridges & etc. being imported as verses in CCLI txt files --- openlp/core/common/settings.py | 2 +- openlp/plugins/songs/lib/importers/cclifile.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/openlp/core/common/settings.py b/openlp/core/common/settings.py index dc123196b..1539a059c 100644 --- a/openlp/core/common/settings.py +++ b/openlp/core/common/settings.py @@ -540,7 +540,7 @@ class Settings(QtCore.QSettings): old_values = [self._convert_value(old_value, default_value) for old_value, default_value in zip(old_values, default_values)] # Iterate over our rules and check what the old_value should be "converted" to. - new_value = None + new_value = old_values[0] for new_rule, old_rule in rules: # If the value matches with the condition (rule), then use the provided value. This is used to # convert values. E. g. an old value 1 results in True, and 0 in False. diff --git a/openlp/plugins/songs/lib/importers/cclifile.py b/openlp/plugins/songs/lib/importers/cclifile.py index 39cf7abe2..facce65c9 100644 --- a/openlp/plugins/songs/lib/importers/cclifile.py +++ b/openlp/plugins/songs/lib/importers/cclifile.py @@ -254,7 +254,6 @@ class CCLIFileImport(SongImport): song_author = '' verse_start = False for line in text_list: - verse_type = 'v' clean_line = line.strip() if not clean_line: if line_number == 0: @@ -279,7 +278,7 @@ class CCLIFileImport(SongImport): elif not verse_start: # We have the verse descriptor verse_desc_parts = clean_line.split(' ') - if len(verse_desc_parts) == 2: + if len(verse_desc_parts): if verse_desc_parts[0].startswith('Ver'): verse_type = VerseType.tags[VerseType.Verse] elif verse_desc_parts[0].startswith('Ch'):