This commit is contained in:
2025-05-21 07:28:42 -04:00
parent 0d58ae2a96
commit e07a9dd7d2
3 changed files with 15 additions and 16 deletions

View File

@ -96,13 +96,15 @@ class Radio(FastAPI):
except Exception as e:
logging.debug("radio_skip Exception: %s", str(e))
traceback.print_exc()
return JSONResponse(
status_code=500,
content={
"err": True,
"errorText": "General failure.",
},
if not isinstance(e, HTTPException):
return JSONResponse(
status_code=500,
content={
"err": True,
"errorText": "General failure.",
},
)
raise e # Re-raise HTTPException
async def radio_reshuffle(
self, data: ValidRadioReshuffleRequest, request: Request

View File

@ -26,10 +26,7 @@ class YT(FastAPI):
)
async def yt_video_search_handler(self, data: ValidYTSearchRequest) -> JSONResponse:
"""
Search for YT Video by Title (closest match returned)
- **t**: Title to search
"""
"""Search for YT Video by Title (closest match returned)"""
title: str = data.t
yts_res: Optional[list[dict]] = await self.ytsearch.search(title)