fixed an issue

the list comprehension could raise `RuntimeError` so i put try and except.
This commit is contained in:
Crussader 2022-03-30 10:21:30 +04:00 committed by GitHub
parent 825db56fc5
commit cc4a46127d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -107,7 +107,11 @@ class Client:
except TimeoutError:
# dont know why it TimeoutError simply happens
# but if it does then manually waiting for each func
[await func for func in processes]
for process in processes:
try:
await process
except RuntimeError:
continue
# tracks are jumbled for huge playlists so we use this to sort it out
tracks.sort(key=lambda i: False if isinstance(i, Track) else i[0])