Commit e3b66624 authored by codey's avatar codey
Browse files

bugfix randmsg/minor

parent 3567e750
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ class RandMsgRequest(BaseModel):
    - **short**: Short randmsg?
    """

    short: Optional[bool] 
    short: Optional[bool] = False

"""
YT
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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()