vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Mar  3 
19:31:48 2019 +0200| [e897a5bef066d9726f07fdca81df237e09399103] | committer: 
Rémi Denis-Courmont

lua/rc: add sd_(add|remove) commands

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e897a5bef066d9726f07fdca81df237e09399103
---

 share/lua/intf/cli.lua | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/share/lua/intf/cli.lua b/share/lua/intf/cli.lua
index 6db1a1cbc9..bbc3047a15 100644
--- a/share/lua/intf/cli.lua
+++ b/share/lua/intf/cli.lua
@@ -278,6 +278,16 @@ function playlist_sort(name,client,arg)
     end
 end
 
+function sd_add(name,client,arg)
+    vlc.sd.add(arg)
+    client:append(arg.." enabled.")
+end
+
+function sd_remove(name,client,arg)
+    vlc.sd.remove(arg)
+    client:append(arg.." disabled.")
+end
+
 function services_discovery(name,client,arg)
     if arg then
         if vlc.sd.is_loaded(arg) then
@@ -563,6 +573,8 @@ commands_ordered = {
     { "move"; { func = move; args = "[X][Y]"; help = "move item X in playlist 
after Y" } };
     { "sort"; { func = playlist_sort; args = "key"; help = "sort the playlist" 
} };
     { "sd"; { func = services_discovery; args = "[sd]"; help = "show services 
discovery or toggle" } };
+    { "sd_add"; { func = sd_add; args = "sd"; help = "add services discovery" 
} };
+    { "sd_remove"; { func = sd_remove; args = "sd"; help = "remove services 
discovery" } };
     { "play"; { func = skip2(vlc.playlist.play); help = "play stream" } };
     { "stop"; { func = skip2(vlc.playlist.stop); help = "stop stream" } };
     { "next"; { func = skip2(vlc.playlist.next); help = "next playlist item" } 
};

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to