🎁 Sync 2026-07-07 20:50:55

This commit is contained in:
github-actions[bot]
2026-07-07 20:50:55 +08:00
parent 5c17703277
commit 7e8d0f0093
100 changed files with 5162 additions and 17005 deletions
+2 -2
View File
@@ -7,8 +7,8 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=baidudrive
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_VERSION:=1.0.1
PKG_RELEASE:=2
LUCI_DEPENDS:=+baidudrive +luci-compat
LUCI_MINIFY_CSS:=0
LUCI_MINIFY_JS:=0
@@ -15,9 +15,13 @@ end
function baidudrive_status()
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
local port = uci:get_first("baidudrive", "baidudrive", "port") or "8080"
local port = uci:get_first("baidudrive", "baidudrive", "port") or "10780"
local app_running = (sys.call("pidof baidudrive >/dev/null") == 0)
local sdk_running = (sys.call("pidof baiduNas >/dev/null") == 0)
local status = {
running = (sys.call("pidof baidudrive >/dev/null") == 0),
running = app_running and sdk_running,
app_running = app_running,
sdk_running = sdk_running,
port = port
}
luci.http.prepare_content("application/json")
@@ -24,7 +24,7 @@ end
data_dir.default = default_path
local port = s:option(Value, "port", translate("Listen port"))
port.default = "8080"
port.default = "10780"
port.rmempty = false
port.datatype = "port"
port.description = translate("Port for BaiduDrive HTTP server.")
@@ -3,7 +3,9 @@ XHR.poll(5, '<%=url("admin/services/baidudrive_status")%>', null, function(x, st
var el = document.getElementById('baidudrive_status');
if (st && el) {
if (!st.running) {
el.innerHTML = '<br/><em style=\"color:red\"><%:The BaiduDrive service is not running.%></em>';
el.innerHTML = '<br/><em style=\"color:red\"><%:The BaiduDrive service is not running.%></em>'
+ '<br/><small>baidudrive: ' + (st.app_running ? 'running' : 'stopped')
+ ', baiduNas: ' + (st.sdk_running ? 'running' : 'stopped') + '</small>';
}
if (st.running) {
el.innerHTML = '<br/><em style=\"color:green\"><%:The BaiduDrive service is running.%></em>'
@@ -0,0 +1,56 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: luasrc/controller/baidudrive.lua:10 luasrc/model/cbi/baidudrive.lua:3
msgid "BaiduDrive"
msgstr "百度网盘"
#: luasrc/model/cbi/baidudrive.lua:3
msgid "BaiduDrive provides a Baidu Netdisk Web UI."
msgstr "百度网盘提供 WEBUI"
#: luasrc/view/baidudrive/baidudrive_status.htm:10
msgid "Click to open BaiduDrive"
msgstr "点击打开百度网盘 WEBUI"
#: luasrc/view/baidudrive/baidudrive_status.htm:19
msgid "Collecting data..."
msgstr ""
#: luasrc/model/cbi/baidudrive.lua:16
msgid "Data directory"
msgstr "数据文件夹"
#: luasrc/model/cbi/baidudrive.lua:10
msgid "Enable"
msgstr "启用"
#: luasrc/model/cbi/baidudrive.lua:6
msgid "Global settings"
msgstr "全局设置"
#: luasrc/model/cbi/baidudrive.lua:26
msgid "Listen port"
msgstr "监听端口"
#: luasrc/model/cbi/baidudrive.lua:30
msgid "Port for BaiduDrive HTTP server."
msgstr "百度网盘 HTTP 服务的端口号"
#: luasrc/model/cbi/baidudrive.lua:18
msgid ""
"Required. BaiduDrive stores its config, session and task data under this "
"directory."
msgstr "必需。百度网盘在此文件夹下保存配置和会话,以及任务数据"
#: luasrc/view/baidudrive/baidudrive_status.htm:17
msgid "Status"
msgstr "状态"
#: luasrc/view/baidudrive/baidudrive_status.htm:6
msgid "The BaiduDrive service is not running."
msgstr "百度网盘未运行"
#: luasrc/view/baidudrive/baidudrive_status.htm:9
msgid "The BaiduDrive service is running."
msgstr "百度网盘运行中"
+1
View File
@@ -0,0 +1 @@
zh-cn