misc/radio

This commit is contained in:
2025-02-11 08:41:29 -05:00
parent 32009c9a99
commit 028cfc197b
4 changed files with 11 additions and 24 deletions

View File

@ -104,21 +104,16 @@ class Radio(FastAPI):
"radio/queue_shift": self.radio_queue_shift,
"radio/reshuffle": self.radio_reshuffle,
"radio/queue_remove": self.radio_queue_remove,
# "widget/sqlite": self.homepage_sqlite_widget,
# "widget/lyrics": self.homepage_lyrics_widget,
# "widget/radio": self.homepage_radio_widget,
"radio/ls._next_": self.radio_get_next,
}
for endpoint, handler in self.endpoints.items():
app.add_api_route(f"/{endpoint}", handler, methods=["POST"],
include_in_schema=True) # change include_in_schema to False
include_in_schema=False) # change include_in_schema to False
# NOTE: Not in loop because method is GET for this endpoint
app.add_api_route("/radio/album_art", self.album_art_handler, methods=["GET"],
include_in_schema=True)
#NOTE: Not in loop because include_in_schema is False for this endpoint, private
app.add_api_route("/radio/ls._next_", self.radio_get_next, methods=["POST"],
include_in_schema=False)
include_in_schema=False)
asyncio.get_event_loop().run_until_complete(self.load_playlist())