* 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:
parent
970d9366b2
commit
f67e837cd9
@ -567,7 +567,7 @@ def cmd_yt_search(bot, user, text, command, parameter):
|
|||||||
song_shortlist = [{'type': 'url',
|
song_shortlist = [{'type': 'url',
|
||||||
'url': "https://www.youtube.com/watch?v=" + result[0],
|
'url': "https://www.youtube.com/watch?v=" + result[0],
|
||||||
'title': result[1]
|
'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)
|
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)
|
bot.send_msg(tr('yt_result', result_table=msg), text)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user