From 7384460f7205fec0fae39c05feca6550db111618 Mon Sep 17 00:00:00 2001 From: Akash Mehrotra Date: Mon, 15 Aug 2011 13:27:11 +0530 Subject: [PATCH 1/1] LUA: add addsubtitle control Signed-off-by: Jean-Baptiste Kempf --- share/lua/http/requests/README.txt | 3 +++ share/lua/intf/modules/httprequests.lua | 2 ++ 2 files changed, 5 insertions(+) diff --git a/share/lua/http/requests/README.txt b/share/lua/http/requests/README.txt index 6afac17365..9b3794629c 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 to playlist: ?command=in_enqueue&input= +> add subtitle to currently playing file + ?command=addsubtitle&val= + > play playlist item . If is omitted, play last active item: ?command=pl_play&id= diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua index cdc2324d2a..3ccc9464ec 100644 --- a/share/lua/intf/modules/httprequests.lua +++ b/share/lua/intf/modules/httprequests.lua @@ -88,6 +88,8 @@ processcommands = function () vlc.msg.err( "" ) --]] 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 -- 2.39.2