mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
If the Pool is empty, don't add a song
This commit is contained in:
parent
5619a80105
commit
79982fa81a
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,9 @@ class Pool(PlayMode):
|
||||||
|
|
||||||
async def next(self):
|
async def next(self):
|
||||||
while True:
|
while True:
|
||||||
|
if self.pool:
|
||||||
|
yield None
|
||||||
|
continue
|
||||||
self._pool_copy = self.pool.copy()
|
self._pool_copy = self.pool.copy()
|
||||||
random.shuffle(self._pool_copy)
|
random.shuffle(self._pool_copy)
|
||||||
while self._pool_copy:
|
while self._pool_copy:
|
||||||
|
|
Loading…
Reference in a new issue