From cc783d0bc0db4a0b1d69463607a3f0751cb4dd64 Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 27 Oct 2015 23:09:28 +0100 Subject: [PATCH] Implement "list"/"playlist" commands. These commands make the bot print out the current playlist in the channel chat. The current track being played back is printed in bold green font. --- app.iced | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app.iced b/app.iced index 89e5a8d..a4cf592 100644 --- a/app.iced +++ b/app.iced @@ -212,6 +212,16 @@ ts3clientService.on "started", (ts3proc) => when "empty", "clear" vlc.playlist.clear() ts3query.sendtextmessage args.targetmode, invoker.id, "Cleared the playlist." + when "list", "playlist" + message = "Currently these tracks are in the playlist:\n" + for i in [ 0 .. vlc.playlist.items.count ] + if vlc.playlist.currentItem == i + message += "[COLOR=green][B]" + info = vlcMediaInfo[vlc.playlist.items[i].mrl] + message += "#{i + 1}. [URL=#{info.originalUrl}]#{info.title}[/URL]" + if vlc.playlist.currentItem == i + message += "[/B][/COLOR]" + ts3query.sendtextmessage args.targetmode, invoker.id, message when "enqueue", "add", "append" inputBB = paramline.trim() input = (removeBB paramline).trim()