diff --git a/app/database.py b/app/database.py index 3e7ecf5..b719cda 100644 --- a/app/database.py +++ b/app/database.py @@ -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): diff --git a/app/templates/songlist.html b/app/templates/songlist.html index e78fb91..27d7021 100644 --- a/app/templates/songlist.html +++ b/app/templates/songlist.html @@ -50,7 +50,7 @@ $("#filter").keyup( function () { var value = $(this).val().toLowerCase(); //alert(value); - if(value.length >= 3) { + if(value.length >= 1) { $.getJSON("/api/songs/compl", { search: value }, function (data) { var items = []; $.each(data, function (key, val) {