mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-22 00:17:50 +00:00
fill_player_queue now recursively refetches until queue size is ensured
This commit is contained in:
@@ -32,6 +32,10 @@ class GlobalPlaylist(ABC):
|
||||
async def clear(self):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def remove_tracks(self, track_urls: list[str]):
|
||||
pass
|
||||
|
||||
|
||||
class GlobalAutoJoin(ABC):
|
||||
@abstractmethod
|
||||
|
||||
@@ -29,5 +29,14 @@ class GlobalRedisPlaylist(RedisBotEntity, GlobalPlaylist):
|
||||
"""
|
||||
await self.redis.delete(self.key("playlist"))
|
||||
|
||||
async def remove_tracks(self, track_urls: list[str]):
|
||||
"""
|
||||
Removes a single track from the playlist
|
||||
|
||||
Args:
|
||||
track_url (str): [description]
|
||||
"""
|
||||
await self.redis.srem(self.key("playlist"), *track_urls)
|
||||
|
||||
|
||||
__all__ = ("GlobalRedisPlaylist",)
|
||||
|
||||
Reference in New Issue
Block a user