[vlc-commits] commit: Revert "luahttp: fix service discovery loading." ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Thu Apr 8 16:14:46 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Apr 8 15:59:52 2010 +0200| [8ffc1871cf4466a327f4615775a6a8f3dbe43863] | committer: Rémi Duraffort
Revert "luahttp: fix service discovery loading."
This reverts commit a9e4799e43b57739786acf23efaa65e1379887ea.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ffc1871cf4466a327f4615775a6a8f3dbe43863
---
share/lua/http/dialogs/playlist | 8 +-------
share/lua/http/js/functions.js | 4 ++--
share/lua/http/requests/status.xml | 11 +++--------
3 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/share/lua/http/dialogs/playlist b/share/lua/http/dialogs/playlist
index 01814cc..cf3f58a 100644
--- a/share/lua/http/dialogs/playlist
+++ b/share/lua/http/dialogs/playlist
@@ -83,13 +83,7 @@ This dialog needs the following dialogs to be fully functional: <none>
<?vlc
local sd = vlc.sd.get_services_names()
for n,ln in pairs(sd) do
- local sdname = string.gsub(n, "([^{]*)({.*)", "%1")
- local islua = 0
- if(sdname == "lua") then
- sdname = string.gsub(n, "(lua{sd=')([^']*)'(.*)", "%2")
- islua = 1
- end
- print([[<button class="menuout" onclick='pl_sd("]]..sdname..[[", "]]..islua..[[");hide_menu("menu_sd");' onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" class="menuout" title="Toggle ]]..ln..[[" >]]..ln..[[</button><br/>]])
+ print([[<button onclick="pl_sd(']]..n..[[');hide_menu('menu_sd');" onmouseover="setclass(this,'menuover');" onmouseout="setclass(this,'menuout');" class="menuout" title="Toggle ]]..ln..[[" >]]..ln..[[</button><br/>]])
end
?>
</div>
diff --git a/share/lua/http/js/functions.js b/share/lua/http/js/functions.js
index d75aa16..fc0ed92 100644
--- a/share/lua/http/js/functions.js
+++ b/share/lua/http/js/functions.js
@@ -360,9 +360,9 @@ function pl_repeat()
{
loadXMLDoc( 'requests/status.xml?command=pl_repeat', parse_status );
}
-function pl_sd( value, islua )
+function pl_sd( value )
{
- loadXMLDoc( 'requests/status.xml?command=pl_sd&val='+value+'&islua='+islua, parse_status );
+ loadXMLDoc( 'requests/status.xml?command=pl_sd&val='+value, parse_status );
}
/* misc actions */
diff --git a/share/lua/http/requests/status.xml b/share/lua/http/requests/status.xml
index 17c76df..f4fc486 100644
--- a/share/lua/http/requests/status.xml
+++ b/share/lua/http/requests/status.xml
@@ -79,15 +79,10 @@ elseif command == "pl_loop" then
elseif command == "pl_repeat" then
vlc.playlist.repeat_()
elseif command == "pl_sd" then
- if(_GET['islua'] == "1") then
- sdname = "lua{sd='" .. val .. "'}"
+ if vlc.sd.is_loaded(val) then
+ vlc.sd.remove(val)
else
- sdname = val
- end
- if vlc.sd.is_loaded(sdname) then
- vlc.sd.remove(sdname)
- else
- vlc.sd.add(sdname)
+ vlc.sd.add(val)
end
elseif command == "fullscreen" then
vlc.fullscreen()
More information about the vlc-commits
mailing list