← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~trb143/openlp/bugs into lp:openlp

 

Tim Bentley has proposed merging lp:~trb143/openlp/bugs into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  #693150 Custom Slide Display footer option
  https://bugs.launchpad.net/bugs/693150
  #693202 delete theme
  https://bugs.launchpad.net/bugs/693202
  #712252 Service song already in database detection logic broken
  https://bugs.launchpad.net/bugs/712252

For more details, see:
https://code.launchpad.net/~trb143/openlp/bugs/+merge/52330

Fix up song duplication bug where search_title seems to often have a space at the end.

Reindex will clean up the database once this is in.
-- 
https://code.launchpad.net/~trb143/openlp/bugs/+merge/52330
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bugs into lp:openlp.
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py	2011-02-25 17:05:01 +0000
+++ openlp/plugins/songs/forms/editsongform.py	2011-03-06 16:40:08 +0000
@@ -810,4 +810,4 @@
         # This method must only be run after the self.song = Song() assignment.
         log.debug(u'processTitle')
         self.song.search_title = re.sub(r'[\'"`,;:(){}?]+', u'',
-            unicode(self.song.search_title)).lower()
+            unicode(self.song.search_title)).lower().strip()

=== modified file 'openlp/plugins/songs/lib/foilpresenterimport.py'
--- openlp/plugins/songs/lib/foilpresenterimport.py	2011-02-26 08:14:37 +0000
+++ openlp/plugins/songs/lib/foilpresenterimport.py	2011-03-06 16:40:08 +0000
@@ -540,7 +540,7 @@
                 song.alternate_title = self._child(titelstring)
                 song.search_title += u'@' + song.alternate_title
         song.search_title = re.sub(r'[\'"`,;:(){}?]+', u'',
-            unicode(song.search_title)).lower()
+            unicode(song.search_title)).lower().strip()
 
     def _process_topics(self, foilpresenterfolie, song):
         """

=== modified file 'openlp/plugins/songs/lib/olpimport.py'
--- openlp/plugins/songs/lib/olpimport.py	2011-02-24 05:47:38 +0000
+++ openlp/plugins/songs/lib/olpimport.py	2011-03-06 16:40:08 +0000
@@ -167,7 +167,7 @@
                     new_song.alternate_title = old_titles[1]
                 else:
                     new_song.alternate_title = u''
-            new_song.search_title = song.search_title
+            new_song.search_title = song.search_title.strip()
             new_song.song_number = song.song_number
             new_song.lyrics = song.lyrics
             new_song.search_lyrics = song.search_lyrics

=== modified file 'openlp/plugins/songs/lib/songimport.py'
--- openlp/plugins/songs/lib/songimport.py	2011-02-25 17:05:01 +0000
+++ openlp/plugins/songs/lib/songimport.py	2011-03-06 16:40:08 +0000
@@ -276,6 +276,7 @@
         song.alternate_title = self.alternate_title
         song.search_title = self.remove_punctuation(self.title).lower() \
             + '@' + self.remove_punctuation(self.alternate_title).lower()
+        song.search_title = song.search_title.strip()
         song.song_number = self.song_number
         song.search_lyrics = u''
         verses_changed_to_other = {}

=== modified file 'openlp/plugins/songs/lib/xml.py'
--- openlp/plugins/songs/lib/xml.py	2011-02-25 01:03:25 +0000
+++ openlp/plugins/songs/lib/xml.py	2011-03-06 16:40:08 +0000
@@ -536,7 +536,7 @@
                 song.alternate_title = self._text(title)
                 song.search_title += u'@' + song.alternate_title
         song.search_title = re.sub(r'[\'"`,;:(){}?]+', u'',
-            unicode(song.search_title)).lower()
+            unicode(song.search_title)).lower().strip()
 
     def _process_topics(self, properties, song):
         """

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2011-02-24 05:47:38 +0000
+++ openlp/plugins/songs/songsplugin.py	2011-03-06 16:40:08 +0000
@@ -154,7 +154,7 @@
             if song.alternate_title is None:
                 song.alternate_title = u''
             song.search_title = self.whitespace.sub(u' ', song.title.lower() +
-                u' ' + song.alternate_title.lower())
+                u' ' + song.alternate_title.lower()).strip()
             # Remove the "language" attribute from lyrics tag. This is not very
             # important, but this keeps the database clean. This can be removed
             # when everybody has run the reindex tool once.


Follow ups