forked from openlp/openlp
Hacked the song database to speed up searches and the application start
bzr-revno: 1376
This commit is contained in:
commit
96a54a4fe9
@ -256,7 +256,7 @@ def init_schema(url):
|
|||||||
mapper(Song, songs_table,
|
mapper(Song, songs_table,
|
||||||
properties={
|
properties={
|
||||||
'authors': relation(Author, backref='songs',
|
'authors': relation(Author, backref='songs',
|
||||||
secondary=authors_songs_table),
|
secondary=authors_songs_table, lazy=False),
|
||||||
'book': relation(Book, backref='songs'),
|
'book': relation(Book, backref='songs'),
|
||||||
'media_files': relation(MediaFile, backref='songs',
|
'media_files': relation(MediaFile, backref='songs',
|
||||||
secondary=media_files_songs_table),
|
secondary=media_files_songs_table),
|
||||||
|
@ -253,9 +253,9 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
if self.searchAsYouType:
|
if self.searchAsYouType:
|
||||||
search_length = 1
|
search_length = 1
|
||||||
if self.searchTextEdit.currentSearchType() == SongSearch.Entire:
|
if self.searchTextEdit.currentSearchType() == SongSearch.Entire:
|
||||||
search_length = 7
|
search_length = 4
|
||||||
elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics:
|
elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics:
|
||||||
search_length = 6
|
search_length = 3
|
||||||
if len(text) > search_length:
|
if len(text) > search_length:
|
||||||
self.onSearchTextButtonClick()
|
self.onSearchTextButtonClick()
|
||||||
elif len(text) == 0:
|
elif len(text) == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user