update 2024-04-04 02:00:54

This commit is contained in:
actions-user 2024-04-04 02:00:54 +08:00
parent 0b71f5f9d1
commit ad430f5162
5 changed files with 54 additions and 17 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=alist
PKG_VERSION:=3.33.0
PKG_WEB_VERSION:=3.33.0
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/alist-org/alist/tar.gz/v$(PKG_VERSION)?

View File

@ -23,11 +23,15 @@ get_config() {
# mysql
config_get mysql $1 mysql 0
config_get mysql_type $1 mysql_type "mysql"
config_get mysql_host $1 mysql_host ""
config_get mysql_port $1 mysql_port "3306"
config_get mysql_username $1 mysql_username ""
config_get mysql_password $1 mysql_password ""
config_get mysql_database $1 mysql_database ""
config_get mysql_table_prefix $1 mysql_table_prefix "x_"
config_get mysql_ssl_mode $1 mysql_ssl_mode ""
config_get mysql_dsn $1 mysql_dsn ""
config_load network
config_get lan_addr lan ipaddr "0.0.0.0"
@ -77,7 +81,7 @@ start_service() {
fi
# mysql
[ "$mysql" -eq 1 ] && database=mysql || database=sqlite3
[ "$mysql" -eq 1 ] && database=$mysql_type || database=sqlite3
set_firewall
true > $temp_dir/alist.log
@ -99,9 +103,9 @@ start_service() {
json_add_string "password" "$mysql_password"
json_add_string "name" "$mysql_database"
json_add_string "db_file" "$data_dir/data.db"
json_add_string "table_prefix" "x_"
json_add_string "ssl_mode" ""
json_add_string "dsn" ""
json_add_string "table_prefix" "$mysql_table_prefix"
json_add_string "ssl_mode" "$mysql_ssl_mode"
json_add_string "dsn" "$mysql_dsn"
json_close_object
# meilisearch

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-alist
PKG_VERSION:=1.0.12
PKG_VERSION:=1.0.13
PKG_RELEASE:=1
LUCI_TITLE:=LuCI support for alist

View File

@ -31,23 +31,30 @@ o = s:option(Value,"ssl_key", translate("SSL key"), translate("SSL key file path
o.datatype = "file"
o:depends("ssl", "1")
o = s:option(Flag, "mysql", translate("Enable MySQL"))
o = s:option(Flag, "mysql", translate("Enable Database"))
o.rmempty=false
o = s:option(Value,"mysql_host", translate("MySQL Host"))
o = s:option(ListValue, "mysql_type", translate("Database Type"))
o.datatype = "string"
o:value("mysql", translate("MySQL"))
o:value("postgres", translate("PostgreSQL"))
o.default = "mysql"
o:depends("mysql", "1")
o = s:option(Value,"mysql_host", translate("Database Host"))
o.datatype = "string"
o:depends("mysql", "1")
o = s:option(Value,"mysql_port", translate("MySQL Port"))
o = s:option(Value,"mysql_port", translate("Database Port"))
o.datatype = "and(port,min(1))"
o.default = "3306"
o:depends("mysql", "1")
o = s:option(Value,"mysql_username", translate("MySQL Username"))
o = s:option(Value,"mysql_username", translate("Database Username"))
o.datatype = "string"
o:depends("mysql", "1")
o = s:option(Value,"mysql_password", translate("MySQL Password"))
o = s:option(Value,"mysql_password", translate("Database Password"))
o.datatype = "string"
o.password = true
o:depends("mysql", "1")
@ -56,6 +63,19 @@ o = s:option(Value,"mysql_database", translate("Database Name"))
o.datatype = "string"
o:depends("mysql", "1")
o = s:option(Value,"mysql_table_prefix", translate("Database Table Prefix"))
o.datatype = "string"
o.default = "x_"
o:depends("mysql", "1")
o = s:option(Value,"mysql_ssl_mode", translate("Database SSL Mode"))
o.datatype = "string"
o:depends("mysql", "1")
o = s:option(Value,"mysql_dsn", translate("Database DSN"))
o.datatype = "string"
o:depends("mysql", "1")
o = s:option(Flag, "allow_wan", translate("Allow Access From Internet"))
o.rmempty = false

View File

@ -94,20 +94,33 @@ msgstr "Web 被反向代理到二级目录时,必须填写该选项以确保 W
msgid "Delayed Start (seconds)"
msgstr "开机延时启动(秒)"
msgid "Enable MySQL"
msgstr "启用 MySQL"
msgid "Enable Database"
msgstr "启用远程数据库"
msgid "MySQL Host"
msgid "Database Type"
msgstr "类型"
msgid "Database Host"
msgstr "主机"
msgid "MySQL Port"
msgid "Database Port"
msgstr "端口"
msgid "MySQL Username"
msgid "Database Username"
msgstr "用户名"
msgid "MySQL Password"
msgid "Database Password"
msgstr "密码"
msgid "Database Name"
msgstr "数据库名"
msgid "Database Table Prefix"
msgstr "数据库表前缀"
msgid "Database SSL Mode"
msgstr "SSL模式"
msgid "Database DSN"
msgstr "DSN"