From f67e837cd95662e449a914521a29e3a92af3cb00 Mon Sep 17 00:00:00 2001 From: luca0N! <121697285+luca0N@users.noreply.github.com> Date: Mon, 31 Jul 2023 10:08:43 +0000 Subject: [PATCH] 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. --- command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command.py b/command.py index b4f2103..ca14d32 100644 --- a/command.py +++ b/command.py @@ -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: