revert radio queue behavior
This commit is contained in:
@ -103,8 +103,8 @@ class Radio(FastAPI):
|
|||||||
"err": True,
|
"err": True,
|
||||||
"errorText": "General failure.",
|
"errorText": "General failure.",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
raise e # Re-raise HTTPException
|
raise e # Re-raise HTTPException
|
||||||
|
|
||||||
async def radio_reshuffle(
|
async def radio_reshuffle(
|
||||||
self, data: ValidRadioReshuffleRequest, request: Request
|
self, data: ValidRadioReshuffleRequest, request: Request
|
||||||
@ -280,7 +280,6 @@ class Radio(FastAPI):
|
|||||||
(Track will be removed from the queue in the process.)
|
(Track will be removed from the queue in the process.)
|
||||||
- **key**: API key
|
- **key**: API key
|
||||||
- **skipTo**: Optional UUID to skip to
|
- **skipTo**: Optional UUID to skip to
|
||||||
- **pop**: Whether to pop the item from the queue when returning, or simply peek (for LiquidSoap prefetch compatibility)
|
|
||||||
"""
|
"""
|
||||||
if not self.util.check_key(path=request.url.path, req_type=4, key=data.key):
|
if not self.util.check_key(path=request.url.path, req_type=4, key=data.key):
|
||||||
raise HTTPException(status_code=403, detail="Unauthorized")
|
raise HTTPException(status_code=403, detail="Unauthorized")
|
||||||
@ -298,14 +297,7 @@ class Radio(FastAPI):
|
|||||||
"errorText": "General failure occurred, prompting playlist reload.",
|
"errorText": "General failure occurred, prompting playlist reload.",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
next = self.radio_util.active_playlist.pop(0)
|
||||||
logging.info("Radio get next!! Pop: %s", data.pop)
|
|
||||||
|
|
||||||
if data.pop:
|
|
||||||
next = self.radio_util.active_playlist.pop(0)
|
|
||||||
else:
|
|
||||||
next = self.radio_util.active_playlist[0]
|
|
||||||
|
|
||||||
if not isinstance(next, dict):
|
if not isinstance(next, dict):
|
||||||
logging.critical("next is of type: %s, reloading playlist...", type(next))
|
logging.critical("next is of type: %s, reloading playlist...", type(next))
|
||||||
await self.on_start()
|
await self.on_start()
|
||||||
|
@ -52,8 +52,8 @@ class RadioUtil:
|
|||||||
self.playback_genres: list[str] = [
|
self.playback_genres: list[str] = [
|
||||||
# "post-hardcore",
|
# "post-hardcore",
|
||||||
# "post hardcore",
|
# "post hardcore",
|
||||||
# "metalcore",
|
"metalcore",
|
||||||
# "deathcore",
|
"deathcore",
|
||||||
# "edm",
|
# "edm",
|
||||||
# "electronic",
|
# "electronic",
|
||||||
# "hard rock",
|
# "hard rock",
|
||||||
|
Reference in New Issue
Block a user