From e8da814e5946996a8f2670fc5575c89b3a2bd42f Mon Sep 17 00:00:00 2001 From: icedream Date: Thu, 5 Nov 2015 18:40:49 +0100 Subject: [PATCH] Implement "current" command, see #7. --- app.iced | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app.iced b/app.iced index 3e6c834..94c4f4c 100644 --- a/app.iced +++ b/app.iced @@ -186,6 +186,15 @@ ts3clientService.on "started", (ts3proc) => params = [] switch name.toLowerCase() + when "current" + item = vlc.playlist.items[vlc.playlist.currentItem] + info = vlcMediaInfo[item.mrl] + url = info?.originalUrl or item.mrl + title = info?.title or item.mrl + ts3query?.sendtextmessage 2, 0, "Currently playing [URL=#{url}]#{title}[/URL]." + + # Restore audio volume + vlc.audio.volume = vlcVolume when "pause" # now we can toggle-pause playback this easily! yay! vlc.togglePause()