revert radio queue behavior
This commit is contained in:
@ -103,8 +103,8 @@ class Radio(FastAPI):
|
||||
"err": True,
|
||||
"errorText": "General failure.",
|
||||
},
|
||||
)
|
||||
raise e # Re-raise HTTPException
|
||||
)
|
||||
raise e # Re-raise HTTPException
|
||||
|
||||
async def radio_reshuffle(
|
||||
self, data: ValidRadioReshuffleRequest, request: Request
|
||||
@ -280,7 +280,6 @@ class Radio(FastAPI):
|
||||
(Track will be removed from the queue in the process.)
|
||||
- **key**: API key
|
||||
- **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):
|
||||
raise HTTPException(status_code=403, detail="Unauthorized")
|
||||
@ -298,14 +297,7 @@ class Radio(FastAPI):
|
||||
"errorText": "General failure occurred, prompting playlist reload.",
|
||||
},
|
||||
)
|
||||
|
||||
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]
|
||||
|
||||
next = self.radio_util.active_playlist.pop(0)
|
||||
if not isinstance(next, dict):
|
||||
logging.critical("next is of type: %s, reloading playlist...", type(next))
|
||||
await self.on_start()
|
||||
|
@ -52,8 +52,8 @@ class RadioUtil:
|
||||
self.playback_genres: list[str] = [
|
||||
# "post-hardcore",
|
||||
# "post hardcore",
|
||||
# "metalcore",
|
||||
# "deathcore",
|
||||
"metalcore",
|
||||
"deathcore",
|
||||
# "edm",
|
||||
# "electronic",
|
||||
# "hard rock",
|
||||
|
Reference in New Issue
Block a user