From 04b1d0ec30aaf02839f9e764031cb0af1b0e09e7 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Thu, 10 Apr 2014 09:33:25 +0200 Subject: [PATCH] Fix songbook search --- openlp/plugins/songs/lib/mediaitem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index ad981135f..c735f0acf 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -192,7 +192,7 @@ class SongMediaItem(MediaManagerItem): song_number = False if not search_results: search_keywords = search_keywords.rpartition(' ') - search_string = '%' + search_keywords + '%' + search_string = '%' + search_keywords[0] + '%' search_results = self.plugin.manager.get_all_objects(Book, Book.name.like(search_string), Book.name.asc()) song_number = re.sub(r'[^0-9]', '', search_keywords[2])