mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-07-29 15:29:14 +02:00
add to ui and add remove api
This commit is contained in:
@@ -173,12 +173,10 @@ class Module(ActiveModifier):
|
||||
self.skip_next = max(self.skip_next, 0)
|
||||
return {"status": "ok", "data": self.skip_next}
|
||||
elif data.get("action") == "skipi":
|
||||
idx = data.get("target")
|
||||
if not idx or not isinstance(idx, int): return {"status": "data", "data": list(self.skip_indexes)}
|
||||
self.skip_indexes.add(idx)
|
||||
if (add := data.get("add")) and isinstance(add, int): self.skip_indexes.add(add)
|
||||
if (remove := data.get("remove")) is not None and isinstance(remove, int) and remove in self.skip_indexes: self.skip_indexes.remove(remove)
|
||||
return {"status": "ok", "data": list(self.skip_indexes)}
|
||||
|
||||
|
||||
activemod = Module()
|
||||
|
||||
# This is free and unencumbered software released into the public domain.
|
||||
|
||||
Reference in New Issue
Block a user