diff --git a/app/models.py b/app/models.py index c0f1396..e69431a 100644 --- a/app/models.py +++ b/app/models.py @@ -731,7 +731,7 @@ class Tracks(Base): return ( session.execute( select(cls) - .where(cls.title.ilike(f"%{text}%")) + .where(cls.title.like(f"{text}%")) .order_by(cls.title) ) .scalars() diff --git a/app/musicmuster.py b/app/musicmuster.py index 0f3dad2..a4a3124 100755 --- a/app/musicmuster.py +++ b/app/musicmuster.py @@ -1837,7 +1837,7 @@ class DbDialog(QDialog): """Handle text typed in search box""" self.ui.matchList.clear() - if len(s) > 1: + if len(s) > 0: if self.ui.radioTitle.isChecked(): matches = Tracks.search_titles(self.session, s) else: