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):
|
def search_entire(self, search_keywords):
|
||||||
search_string = '%{text}%'.format(text=clean_string(search_keywords))
|
search_string = '%{text}%'.format(text=clean_string(search_keywords))
|
||||||
return self.plugin.manager.get_all_objects(
|
return (self.plugin.manager.session.query(Song)
|
||||||
Song, or_(Song.search_title.like(search_string), Song.search_lyrics.like(search_string),
|
.join(SongBookEntry, isouter=True)
|
||||||
Song.comments.like(search_string)))
|
.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):
|
def on_song_list_load(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user