From d82721128f6319d4382daf0ee9adf9cf010137c1 Mon Sep 17 00:00:00 2001 From: icedream Date: Tue, 27 Oct 2015 23:54:01 +0100 Subject: [PATCH] Implement "loop" command. This command allows looping the playlist by just passing the command "loop on". Respectively, "loop off" turns off looping again. --- app.iced | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app.iced b/app.iced index 3f6cd34..e009421 100644 --- a/app.iced +++ b/app.iced @@ -205,6 +205,24 @@ ts3clientService.on "started", (ts3proc) => # play it in VLC vlc.play info.url + when "loop" + inputBB = paramline + input = null + switch (removeBB paramline).toLowerCase().trim() + when "" + # just show current mode + ts3query.sendtextmessage args.targetmode, invoker.id, "Playlist looping is #{if vlc.playlist.mode == vlc.playlist.Loop then "on" else "off"}." + when "on" + # enable looping + vlc.playlist.mode = vlc.playlist.Loop + ts3query.sendtextmessage args.targetmode, invoker.id, "Playlist looping is now on." + when "off" + # disable looping + vlc.playlist.mode = vlc.playlist.Normal + ts3query.sendtextmessage args.targetmode, invoker.id, "Playlist looping is now off." + else + ts3query.sendtextmessage args.targetmode, invoker.id, "[B]#{name} on|off[/B] - Turns playlist looping on or off" + return when "next" vlc.playlist.next() when "prev", "previous"