Implement "loop" command.
This command allows looping the playlist by just passing the command "loop on". Respectively, "loop off" turns off looping again.pull/20/head
parent
0762d6d0bd
commit
d82721128f
18
app.iced
18
app.iced
|
@ -205,6 +205,24 @@ ts3clientService.on "started", (ts3proc) =>
|
||||||
|
|
||||||
# play it in VLC
|
# play it in VLC
|
||||||
vlc.play info.url
|
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"
|
when "next"
|
||||||
vlc.playlist.next()
|
vlc.playlist.next()
|
||||||
when "prev", "previous"
|
when "prev", "previous"
|
||||||
|
|
Loading…
Reference in New Issue