forked from openlp/openlp
added SongBook name, Song Number and Alternative Title to Entire Search
Fixes: https://launchpad.net/bugs/1695587
This commit is contained in:
parent
81492013ed
commit
e6d4857c81
@ -231,9 +231,13 @@ class SongMediaItem(MediaManagerItem):
|
||||
|
||||
def search_entire(self, search_keywords):
|
||||
search_string = '%{text}%'.format(text=clean_string(search_keywords))
|
||||
return self.plugin.manager.get_all_objects(
|
||||
Song, or_(Song.search_title.like(search_string), Song.search_lyrics.like(search_string),
|
||||
Song.comments.like(search_string)))
|
||||
return (self.plugin.manager.session.query(Song)
|
||||
.join(SongBookEntry, isouter=True)
|
||||
.join(Book, isouter=True)
|
||||
.filter(or_(Book.name.like(search_string), SongBookEntry.entry.like(search_string),
|
||||
Song.search_title.like(search_string), Song.search_lyrics.like(search_string),
|
||||
Song.comments.like(search_string), Song.alternate_title.like(search_string)))
|
||||
.all())
|
||||
|
||||
def on_song_list_load(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user