[vlc-commits] LUA: add addsubtitle control

Akash Mehrotra git at videolan.org
Tue Aug 30 19:41:45 CEST 2011


vlc | branch: master | Akash Mehrotra <mehrotra.akash at gmail.com> | Mon Aug 15 13:45:11 2011 +0530| [7384460f7205fec0fae39c05feca6550db111618] | committer: Jean-Baptiste Kempf

LUA: add addsubtitle control

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 share/lua/http/requests/README.txt      |    3 +++
 share/lua/intf/modules/httprequests.lua |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt
index 6afac17..9b37946 100644
--- a/share/lua/http/requests/README.txt
+++ b/share/lua/http/requests/README.txt
@@ -24,6 +24,9 @@ status.xml or status.json
 > add <mrl> to playlist:
   ?command=in_enqueue&input=<mrl>
 
+> add subtitle to currently playing file
+  ?command=addsubtitle&val=<path>
+
 > play playlist item <id>. If <id> is omitted, play last active item:
   ?command=pl_play&id=<id>
 
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index cdc2324..3ccc946 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -88,6 +88,8 @@ processcommands = function ()
 	  vlc.msg.err( "</options>" )
 	  --]]
 	  vlc.playlist.add({{path=stripslashes(input),options=options}})
+	elseif command == "addsubtitle" then
+	  vlc.input.add_subtitle (stripslashes(val))
 	elseif command == "in_enqueue" then
 	  vlc.playlist.enqueue({{path=stripslashes(input),options=options}})
 	elseif command == "pl_play" then



More information about the vlc-commits mailing list