X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-uvc_streamer%2Fluasrc%2Fmodel%2Fcbi%2Fuvc_streamer.lua;h=2054185d4d63e8594f8d56cc50d7e2e9a7f3b455;hb=ee613dd296b76b00577510e60db0cb880e87d469;hp=7c8e4bd494e58e57bea780224f903579c039991d;hpb=ac05bea1be004a4270a43825dae8430c579be72b;p=project%2Fluci.git diff --git a/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua b/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua index 7c8e4bd49..2054185d4 100644 --- a/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua +++ b/applications/luci-uvc_streamer/luasrc/model/cbi/uvc_streamer.lua @@ -1,6 +1,30 @@ -m = Map("uvc-streamer", translate("uvc_streamer"), translate("uvc_streamer_desc")) +--[[ -s = m:section(TypedSection, "uvc-streamer", translate("settings")) +LuCI UVC Streamer +(c) 2008 Yanira + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +]]-- + +-- find current lan address and port of first uvc_streamer config section +local uci = luci.model.uci.cursor_state() +local addr = uci:get("network", "lan", "ipaddr") +local port + +uci:foreach( "uvc_streamer", "uvc_streamer", + function(section) port = port or tonumber(section.port) end ) + +m = Map("uvc_streamer", translate("uvc_streamer"), + translatef("uvc_streamer_desc", nil, addr, port, addr, port)) + +s = m:section(TypedSection, "uvc_streamer", translate("settings")) s.addremove = false s.anonymous = true