1
Fork 0
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:
Steffo 2019-04-12 19:24:42 +02:00
parent 5619a80105
commit 79982fa81a

View file

@ -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: