docstrings
This commit is contained in:
parent
9f615ad0d9
commit
09dd9db970
@ -158,6 +158,7 @@ class Radio(FastAPI):
|
||||
status_code=302)
|
||||
|
||||
async def radio_now_playing(self, request: Request) -> dict:
|
||||
"""Get currently playing track info"""
|
||||
ret_obj: dict = {**self.radio_util.now_playing}
|
||||
cur_elapsed: int = self.radio_util.now_playing.get('elapsed', -1)
|
||||
cur_duration: int = self.radio_util.now_playing.get('duration', 999999)
|
||||
@ -215,6 +216,7 @@ class Radio(FastAPI):
|
||||
|
||||
|
||||
async def radio_request(self, data: ValidRadioSongRequest, request: Request) -> Response:
|
||||
"""Song request handler"""
|
||||
if not self.util.check_key(path=request.url.path, req_type=4, key=data.key):
|
||||
raise HTTPException(status_code=403, detail="Unauthorized")
|
||||
artistsong: str = data.artistsong
|
||||
|
Loading…
x
Reference in New Issue
Block a user