]> git.sesse.net Git - vlc/commitdiff
LUA: add addsubtitle control
authorAkash Mehrotra <mehrotra.akash@gmail.com>
Mon, 15 Aug 2011 07:57:11 +0000 (13:27 +0530)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Aug 2011 17:38:21 +0000 (19:38 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
share/lua/http/requests/README.txt
share/lua/intf/modules/httprequests.lua

index 6afac173651ed98b26d4347408c13f6be01473f7..9b3794629ccf18c453992ef33c864c97b12da3f2 100644 (file)
@@ -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>
 
index cdc2324d2aaa751c7b8c633efe664a4edaa3ef19..3ccc9464ec132c34a91a75263a7512aadf512c34 100644 (file)
@@ -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