From 4d00052697ad17c0a59602cc89a5dd868c77575e Mon Sep 17 00:00:00 2001
From: sbwml <984419930@qq.com>
Date: Fri, 9 Sep 2022 19:22:50 +0800
Subject: [PATCH] luci-app-alist: update for v3
---
luci-app-alist/Makefile | 4 ++--
luci-app-alist/luasrc/model/cbi/alist.lua | 27 +++++++---------------
luci-app-alist/po/zh-cn/alist.po | 9 --------
luci-app-alist/root/etc/alist/data.db | Bin 28672 -> 36864 bytes
luci-app-alist/root/etc/config/alist | 4 +---
luci-app-alist/root/etc/init.d/alist | 8 +++----
6 files changed, 14 insertions(+), 38 deletions(-)
diff --git a/luci-app-alist/Makefile b/luci-app-alist/Makefile
index 11ebc45..27d4822 100644
--- a/luci-app-alist/Makefile
+++ b/luci-app-alist/Makefile
@@ -6,11 +6,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-alist
-PKG_VERSION:=1.0.4
+PKG_VERSION:=1.0.5
PKG_RELEASE:=1
LUCI_TITLE:=LuCI support for alist
-LUCI_DEPENDS:=+alist +luci-compat
+LUCI_DEPENDS:=+alist
define Package/$(PKG_NAME)/conffiles
/etc/alist
diff --git a/luci-app-alist/luasrc/model/cbi/alist.lua b/luci-app-alist/luasrc/model/cbi/alist.lua
index be84605..9a15cbd 100644
--- a/luci-app-alist/luasrc/model/cbi/alist.lua
+++ b/luci-app-alist/luasrc/model/cbi/alist.lua
@@ -2,10 +2,10 @@ local m, s
local sys = require "luci.sys"
if sys.call("pidof alist >/dev/null") == 0 then
- local password = sys.exec("/usr/bin/alist --conf /etc/alist/config.json -password | awk '{print $3}'")
- m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "" .. password .. "" .. "
" .. [[]] .. translate("User Manual") .. [[]])
+ local password = sys.exec("/usr/bin/alist --conf /etc/alist/config.json -password |& tail -1 | awk -F': ' '{print $2}'")
+ m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. " " .. translate("manage password:") .. "" .. password .. "" .. "
" .. [[]] .. translate("User Manual") .. [[]])
else
- m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. "
" .. [[]] .. translate("User Manual") .. [[]])
+ m = Map("alist", translate("Alist"), translate("A file list program that supports multiple storage.") .. "
" .. [[]] .. translate("User Manual") .. [[]])
end
m:section(SimpleSection).template = "alist_status"
@@ -21,6 +21,11 @@ o = s:option(Value, "port", translate("Port"))
o.datatype = "and(port,min(1))"
o.rmempty = false
+o = s:option(Value, "temp_dir", translate("Cache directory"))
+o.datatype = "string"
+o.default = "/tmp/alist"
+o.rmempty = false
+
o = s:option(Flag, "ssl", translate("Enable SSL"))
o.rmempty=false
@@ -34,20 +39,4 @@ o:depends("ssl", "1")
o.datatype = "string"
o.rmempty = true
-s = m:section(TypedSection, "alist", translate("Cache settings"))
-s.addremove = false
-s.anonymous = true
-
-o = s:option(Value, "expiration", translate("Cache invalidation time (unit: minutes)"))
-o.datatype = "and(uinteger,min(1))"
-o.rmempty = false
-
-o = s:option(Value, "cleanup_interval", translate("Clear the invalidation cache interval (unit: minutes)"))
-o.datatype = "and(uinteger,min(1))"
-o.rmempty = false
-
-o = s:option(Value, "temp_dir", translate("Cache directory"))
-o.datatype = "string"
-o.rmempty = false
-
return m
diff --git a/luci-app-alist/po/zh-cn/alist.po b/luci-app-alist/po/zh-cn/alist.po
index 4016647..f8d5e46 100644
--- a/luci-app-alist/po/zh-cn/alist.po
+++ b/luci-app-alist/po/zh-cn/alist.po
@@ -34,15 +34,6 @@ msgstr "SSL 密钥"
msgid "SSL key file path"
msgstr "SSL 密钥文件路径"
-msgid "Cache settings"
-msgstr "缓存设置"
-
-msgid "Cache invalidation time (unit: minutes)"
-msgstr "缓存失效时间(分钟)"
-
-msgid "Clear the invalidation cache interval (unit: minutes)"
-msgstr "清理失效缓存间隔(分钟)"
-
msgid "Cache directory"
msgstr "缓存目录"
diff --git a/luci-app-alist/root/etc/alist/data.db b/luci-app-alist/root/etc/alist/data.db
index 63756e27ce21b0bf278af4d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