From cd431652caab01542a020a2938e40a16b041e556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20P=C3=B5ldaru?= Date: Wed, 16 Feb 2011 12:20:25 +0200 Subject: [PATCH] no translation for song tags in database --- openlp/plugins/songs/lib/songimport.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/openlp/plugins/songs/lib/songimport.py b/openlp/plugins/songs/lib/songimport.py index ca54009cb..8c3457ebf 100644 --- a/openlp/plugins/songs/lib/songimport.py +++ b/openlp/plugins/songs/lib/songimport.py @@ -138,12 +138,12 @@ class SongImport(QtCore.QObject): def process_verse_text(self, text): lines = text.split(u'\n') if text.lower().find(self.copyright_string) >= 0 \ - or text.lower().find(self.copyright_symbol) >= 0: + or text.find(self.copyright_symbol) >= 0: copyright_found = False for line in lines: if (copyright_found or line.lower().find(self.copyright_string) >= 0 or - line.lower().find(self.copyright_symbol) >= 0): + line.find(self.copyright_symbol) >= 0): copyright_found = True self.add_copyright(line) else: @@ -219,6 +219,7 @@ class SongImport(QtCore.QObject): """ for (oldversetag, oldverse, oldlang) in self.verses: if oldverse.strip() == versetext.strip(): + # this verse is already present self.verse_order_list_generated.append(oldversetag) self.verse_order_list_generated_useful = True return @@ -278,17 +279,17 @@ class SongImport(QtCore.QObject): other_count = 1 for (versetag, versetext, lang) in self.verses: if versetag[0] == u'C': - versetype = VerseType.to_string(VerseType.Chorus) + versetype = u'Chorus' elif versetag[0] == u'V': - versetype = VerseType.to_string(VerseType.Verse) + versetype = u'Verse' elif versetag[0] == u'B': - versetype = VerseType.to_string(VerseType.Bridge) + versetype = u'Bridge' elif versetag[0] == u'I': - versetype = VerseType.to_string(VerseType.Intro) + versetype = u'Intro' elif versetag[0] == u'P': - versetype = VerseType.to_string(VerseType.PreChorus) + versetype = u'Pre-Chorus' elif versetag[0] == u'E': - versetype = VerseType.to_string(VerseType.Ending) + versetype = u'Ending' else: newversetag = u'O%d' % other_count verses_changed_to_other[versetag] = newversetag