mirror of https://github.com/icedream/ts3bot.git
Implement "current" command, see #7.
parent
003ec48763
commit
e8da814e59
9
app.iced
9
app.iced
|
@ -186,6 +186,15 @@ ts3clientService.on "started", (ts3proc) =>
|
||||||
params = []
|
params = []
|
||||||
|
|
||||||
switch name.toLowerCase()
|
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"
|
when "pause"
|
||||||
# now we can toggle-pause playback this easily! yay!
|
# now we can toggle-pause playback this easily! yay!
|
||||||
vlc.togglePause()
|
vlc.togglePause()
|
||||||
|
|
Loading…
Reference in New Issue