Fix songbook search

This commit is contained in:
Samuel Mehrbrodt 2014-04-10 09:33:25 +02:00
parent 5e9d9a3cd0
commit 04b1d0ec30

View File

@ -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])