Limit number of returned search results

This commit is contained in:
2019-05-31 04:01:53 +02:00
parent e51b6ade9a
commit 0de1c52535
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ def get_song_completions(input_string):
cur = conn.cursor()
# Don't look, it burns...
cur.execute(
"SELECT Title || \" - \" || Artist AS Song, Id FROM songs WHERE Song LIKE REPLACE(REPLACE(REPLACE(REPLACE(UPPER('%"+input_string+"%'),'ö','Ö'),'ü','Ü'),'ä','Ä'),'ß','')")
"SELECT Title || \" - \" || Artist AS Song, Id FROM songs WHERE Song LIKE REPLACE(REPLACE(REPLACE(REPLACE(UPPER('%"+input_string+"%'),'ö','Ö'),'ü','Ü'),'ä','Ä'),'ß','') LIMIT 20")
return cur.fetchall()
def add_entry(name,song_id):