mirror of https://github.com/icedream/ts3bot.git
Fix crash in "current" command when nothing is playing.
parent
d1fe5f4d36
commit
a74b923de0
4
app.iced
4
app.iced
|
@ -188,6 +188,10 @@ ts3clientService.on "started", (ts3proc) =>
|
|||
switch name.toLowerCase()
|
||||
when "current"
|
||||
item = vlc.playlist.items[vlc.playlist.currentItem]
|
||||
if not item?
|
||||
ts3query?.sendtextmessage args.targetmode, invoker.id, "Not playing anything at the moment."
|
||||
return
|
||||
|
||||
info = vlcMediaInfo[item.mrl]
|
||||
url = info?.originalUrl or item.mrl
|
||||
title = info?.title or item.mrl
|
||||
|
|
Loading…
Reference in New Issue