提交 295602fc 编写于 作者: Z ZhenYu 提交者: coolsnowwolf

fix config load (#2584)

上级 aa71afab
......@@ -14,7 +14,7 @@ LUCI_TITLE:=LuCI support for BaiduPCS-Go
LUCI_DEPENDS:=+baidupcs-web +wget +openssl-util
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_MAINTAINER:=<https://github.com/KFERMercer/luci-app-baidupcs-web>
include $(TOPDIR)/feeds/luci/luci.mk
......
......@@ -24,7 +24,7 @@ function openClient() {
var pathName = window.document.location.pathname;
var pos = curWwwPath.indexOf(pathName);
var localhostPath = curWwwPath.substring(0, pos);
var clientPort = window.document.querySelector("#cbid\\.baidupcs-web\\.config\\.port").value
var clientPort = window.document.getElementById("cbid.baidupcs-web.config.port").value
var url = "http:" + localhostPath.substring(window.location.protocol.length) + ":" + clientPort;
window.open(url)
};
......
......@@ -6,10 +6,10 @@ STOP=10
enabled="$(uci get baidupcs-web.config.enabled)"
port="$(uci get baidupcs-web.config.port)"
download_dir="$(uci get baidupcs-web.config.download_dir)"
max_download_rate="$(uci get baidupcs-web.config.max_download_rate)"
max_upload_rate="$(uci get baidupcs-web.config.max_upload_rate)"
max_download_load="$(uci get baidupcs-web.config.max_download_load)"
max_parallel="$(uci get baidupcs-web.config.max_parallel)"
max_download_rate="$(uci get baidupcs-web.config.max_download_rate || echo '0')"
max_upload_rate="$(uci get baidupcs-web.config.max_upload_rate || echo '0')"
max_download_load="$(uci get baidupcs-web.config.max_download_load || echo '1')"
max_parallel="$(uci get baidupcs-web.config.max_parallel || echo '8')"
start() {
stop
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册