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()
|
switch name.toLowerCase()
|
||||||
when "current"
|
when "current"
|
||||||
item = vlc.playlist.items[vlc.playlist.currentItem]
|
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]
|
info = vlcMediaInfo[item.mrl]
|
||||||
url = info?.originalUrl or item.mrl
|
url = info?.originalUrl or item.mrl
|
||||||
title = info?.title or item.mrl
|
title = info?.title or item.mrl
|
||||||
|
|
Loading…
Reference in New Issue