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 63756e2..920b054 100644
Binary files a/luci-app-alist/root/etc/alist/data.db and b/luci-app-alist/root/etc/alist/data.db differ
diff --git a/luci-app-alist/root/etc/config/alist b/luci-app-alist/root/etc/config/alist
index d6c147a..8606df9 100644
--- a/luci-app-alist/root/etc/config/alist
+++ b/luci-app-alist/root/etc/config/alist
@@ -1,7 +1,5 @@
config alist
option 'enabled' '0'
option 'port' '5244'
- option 'expiration' '60'
- option 'cleanup_interval' '120'
- option 'temp_dir' '/tmp'
+ option 'temp_dir' '/tmp/alist'
option 'ssl' '0'
diff --git a/luci-app-alist/root/etc/init.d/alist b/luci-app-alist/root/etc/init.d/alist
index a38d5e1..fe448e1 100755
--- a/luci-app-alist/root/etc/init.d/alist
+++ b/luci-app-alist/root/etc/init.d/alist
@@ -8,9 +8,7 @@ CONFIG=/etc/alist/config.json
get_config() {
config_get_bool enabled $1 enabled 1
config_get port $1 port 5244
- config_get expiration $1 expiration 60
- config_get cleanup_interval $1 cleanup_interval 120
- config_get temp_dir $1 temp_dir "/tmp"
+ config_get temp_dir $1 temp_dir "/tmp/alist"
config_get ssl $1 ssl 0
config_get ssl_cert $1 ssl_cert ""
config_get ssl_key $1 ssl_key ""
@@ -27,11 +25,11 @@ start_service() {
SSL=false
fi
cat > $CONFIG <