diff --git a/app.iced b/app.iced index b4396cb..828b76d 100644 --- a/app.iced +++ b/app.iced @@ -72,8 +72,9 @@ ts3clientService.on "started", (ts3proc) => # VLC event handling 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] - 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.onForward = () => ts3query.sendtextmessage 2, 0, "Fast-forwarding..." vlc.onBackward = () => ts3query.sendtextmessage 2, 0, "Rewinding..."