fix: you can't just feed play_url wrong things
This commit is contained in:
parent
091d303729
commit
b24766cddb
@ -300,6 +300,7 @@ def cmd_play_url(bot, user, text, command, parameter):
|
|||||||
global log
|
global log
|
||||||
|
|
||||||
url = util.get_url_from_input(parameter)
|
url = util.get_url_from_input(parameter)
|
||||||
|
if url:
|
||||||
music_wrapper = get_item_wrapper(bot, type='url', url=url, user=user)
|
music_wrapper = get_item_wrapper(bot, type='url', url=url, user=user)
|
||||||
var.playlist.append(music_wrapper)
|
var.playlist.append(music_wrapper)
|
||||||
|
|
||||||
@ -308,6 +309,9 @@ def cmd_play_url(bot, user, text, command, parameter):
|
|||||||
if len(var.playlist) == 2:
|
if len(var.playlist) == 2:
|
||||||
# If I am the second item on the playlist. (I am the next one!)
|
# If I am the second item on the playlist. (I am the next one!)
|
||||||
bot.async_download_next()
|
bot.async_download_next()
|
||||||
|
else:
|
||||||
|
bot.send_msg(constants.strings('bad_parameter', command=command))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def cmd_play_playlist(bot, user, text, command, parameter):
|
def cmd_play_playlist(bot, user, text, command, parameter):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user