From 8565db715f536cdce331873aa3ca21748f821afe Mon Sep 17 00:00:00 2001 From: Phill Date: Fri, 28 Jun 2019 20:26:46 +0100 Subject: [PATCH] Moar minor changes --- openlp/plugins/songs/lib/importers/wordsofworship.py | 6 +++--- openlp/plugins/songs/lib/openlyricsxml.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/songs/lib/importers/wordsofworship.py b/openlp/plugins/songs/lib/importers/wordsofworship.py index 6a3f1707e..97917ee29 100644 --- a/openlp/plugins/songs/lib/importers/wordsofworship.py +++ b/openlp/plugins/songs/lib/importers/wordsofworship.py @@ -93,7 +93,7 @@ class WordsOfWorshipImport(SongImport): * 0x00 = Normal * 0x01 = Minor - It looks like this may have been introduced in Words of Worship song version 1.2.2, though this is an educated + It looks like this may have been introduced in Words of Worship song version 2.1.0, though this is an educated guess. Footer: @@ -152,7 +152,7 @@ class WordsOfWorshipImport(SongImport): lines_to_read = read_int(song_data, DataType.U32, 'little') for line_no in range(0, lines_to_read): line_text = self.parse_string(song_data) - if self.read_version >= (1, 2, 2): + if self.read_version >= (2, 1, 0): if read_or_fail(song_data, DataType.U8) == b'\x01': line_text = '{{minor}}{text}{{/minor}}'.format(text=line_text) lines.append(line_text) @@ -199,7 +199,7 @@ class WordsOfWorshipImport(SongImport): with file_path.open('rb') as song_data: if not self.vaildate(file_path, song_data): continue - seek_or_fail(song_data, 24) + seek_or_fail(song_data, 20) self.read_version = self.parse_version(song_data) # Seek to byte which stores number of blocks in the song seek_or_fail(song_data, 56) diff --git a/openlp/plugins/songs/lib/openlyricsxml.py b/openlp/plugins/songs/lib/openlyricsxml.py index 2ba630a12..efa3103d2 100644 --- a/openlp/plugins/songs/lib/openlyricsxml.py +++ b/openlp/plugins/songs/lib/openlyricsxml.py @@ -336,7 +336,7 @@ class OpenLyrics(object): :return: the lyrics with the converted chords """ # Process chords. - new_text = re.sub(r'\[(?!CDATA)(\w.*?)\]', r'', text) + new_text = re.sub(r'\[(\w.*?)\]', r'', text) return new_text def _get_missing_tags(self, text):