mirror of https://github.com/icedream/ts3bot.git
Quick fix for the no-metadata crash, closes #23.
parent
b1cc9f6255
commit
2ee4dc32c3
3
app.iced
3
app.iced
|
@ -72,8 +72,9 @@ ts3clientService.on "started", (ts3proc) =>
|
||||||
|
|
||||||
# VLC event handling
|
# VLC event handling
|
||||||
vlc.onPlaying = () =>
|
vlc.onPlaying = () =>
|
||||||
|
# TODO: Check why info is sometimes null, something must be wrong with the "add"/"play" commands here!
|
||||||
info = vlcMediaInfo[vlc.playlist.items[vlc.playlist.currentItem].mrl]
|
info = vlcMediaInfo[vlc.playlist.items[vlc.playlist.currentItem].mrl]
|
||||||
ts3query.sendtextmessage 2, 0, "Now playing [URL=#{info.originalUrl}]#{info.title}[/URL]."
|
ts3query.sendtextmessage 2, 0, "Now playing [URL=#{info?.originalUrl or vlc.playlist.items[vlc.playlist.currentItem].mrl}]#{info?.title or vlc.playlist.items[vlc.playlist.currentItem].mrl}[/URL]."
|
||||||
vlc.onPaused = () => ts3query.sendtextmessage 2, 0, "Paused."
|
vlc.onPaused = () => ts3query.sendtextmessage 2, 0, "Paused."
|
||||||
vlc.onForward = () => ts3query.sendtextmessage 2, 0, "Fast-forwarding..."
|
vlc.onForward = () => ts3query.sendtextmessage 2, 0, "Fast-forwarding..."
|
||||||
vlc.onBackward = () => ts3query.sendtextmessage 2, 0, "Rewinding..."
|
vlc.onBackward = () => ts3query.sendtextmessage 2, 0, "Rewinding..."
|
||||||
|
|
Loading…
Reference in New Issue