diff --git a/endpoints/constructors.py b/endpoints/constructors.py index 7f568b1..0ddc295 100644 --- a/endpoints/constructors.py +++ b/endpoints/constructors.py @@ -100,7 +100,7 @@ class RandMsgRequest(BaseModel): - **short**: Short randmsg? """ - short: Optional[bool] + short: Optional[bool] = False """ YT diff --git a/endpoints/radio.py b/endpoints/radio.py index 58f8f70..1f408f2 100644 --- a/endpoints/radio.py +++ b/endpoints/radio.py @@ -304,7 +304,7 @@ class Radio(FastAPI): 'err': True, 'errorText': 'Invalid request.', }) - typeahead = await self.radio_util.trackdb_typeahead(data.query) + typeahead: Optional[list[str]] = await self.radio_util.trackdb_typeahead(data.query) if not typeahead: return JSONResponse(content=[]) return JSONResponse(content=typeahead) \ No newline at end of file diff --git a/endpoints/radio_util.py b/endpoints/radio_util.py index adb7de4..60c4271 100644 --- a/endpoints/radio_util.py +++ b/endpoints/radio_util.py @@ -72,7 +72,7 @@ class RadioUtil: timeout=1) as _db: _db.row_factory = sqlite3.Row db_query: str = 'SELECT (artist || " - " || song) as artistsong FROM tracks WHERE\ - artistsong LIKE ? LIMIT 15' + artistsong LIKE ? LIMIT 30' db_params: tuple[str] = (f"%{query}%",) async with _db.execute(db_query, db_params) as _cursor: result: Iterable[sqlite3.Row] = await _cursor.fetchall()