Update client.py

This commit is contained in:
Crussader 2022-03-28 09:13:49 +04:00 committed by GitHub
parent 980156ea92
commit 8fde71e0f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -94,13 +94,13 @@ class Client:
cls = Playlist(data, []) cls = Playlist(data, [])
else: else:
urls = [REQUEST_URL.format(type="album", id=album['id'])+'/tracks' urls = [REQUEST_URL.format(type="album", id=album['id'])+'/tracks'
for album in (data['items'] if not other else other['items'])] for album in other['items']]
cls = Artist(data, []) cls = Artist(data, [])
processes = [_fetch_async(url, count) processes = [_fetch_async(url, count)
for url, count in enumerate(urls[:9] if not full else urls, start=1)] for url, count in enumerate(urls, start=1)]
try: try:
await asyncio.gather(*processes) await asyncio.gather(*processes)