diff --git a/endpoints/radio.py b/endpoints/radio.py index c288ca2..7f301d2 100644 --- a/endpoints/radio.py +++ b/endpoints/radio.py @@ -54,17 +54,18 @@ class Radio(FastAPI): methods=["GET"], include_in_schema=True, ) - + app.add_event_handler("startup", self.on_start) async def on_start(self) -> None: logging.info("radio: Initializing") - thread = threading.Thread(target=asyncio.run, args=(self.radio_util.load_playlist(),)) + thread = threading.Thread( + target=asyncio.run, args=(self.radio_util.load_playlist(),) + ) thread.start() # await self.radio_util.load_playlist() await self.radio_util._ls_skip() - async def radio_skip( self, data: ValidRadioNextRequest, request: Request ) -> JSONResponse: