From 2ee4dc32c30e61e25f13a7062850f8481dfd86a1 Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 2 Nov 2015 16:06:34 +0100 Subject: [PATCH] Quick fix for the no-metadata crash, closes #23. --- app.iced | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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..."