Possibly patched errors on too-few results
Commit has not been battle-tested
This commit is contained in:
parent
4daa0cbbfe
commit
5772ef6d36
2
music.py
Executable file → Normal file
2
music.py
Executable file → Normal file
@ -54,7 +54,7 @@ def inlinequery(update, context: CallbackContext):
|
||||
|
||||
if query:
|
||||
sp_info = sp.search(q=query, limit=num_results)
|
||||
for i in range(num_results):
|
||||
for i in range(len(sp_info)):
|
||||
sp_title = util.get(sp_info, f"/tracks/items/[{i}]/name")
|
||||
sp_artist = util.get(sp_info, f"/tracks/items/[{i}]/artists/[0]/name")
|
||||
sp_albname = util.get(sp_info, f"/tracks/items/[{i}]/album/name")
|
||||
|
Loading…
Reference in New Issue
Block a user