Fix `ytsearch -n' next page issue (#373) (#374)

* Fix `ytsearch -n' next page issue (#373)

Fix an issue which caused the `ytsearch' to improperly fill the shortlist when used with `-p' to query the next search page.

* Fix code syntax

Add empty line removed in the previous commit.
This commit is contained in:
luca0N! 2023-07-31 10:08:43 +00:00 committed by GitHub
parent 970d9366b2
commit f67e837cd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,7 +567,7 @@ def cmd_yt_search(bot, user, text, command, parameter):
song_shortlist = [{'type': 'url',
'url': "https://www.youtube.com/watch?v=" + result[0],
'title': result[1]
} for result in yt_last_result[yt_last_page * item_per_page: item_per_page]]
} for result in yt_last_result[yt_last_page * item_per_page: (yt_last_page * item_per_page) + item_per_page]]
msg = _yt_format_result(yt_last_result, yt_last_page * item_per_page, item_per_page)
bot.send_msg(tr('yt_result', result_table=msg), text)
else: