luci-app-aliyundrive-webdav: update to 0.5.1 (#8144)

Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
This commit is contained in:
Beginner 2021-10-31 17:03:39 +08:00 committed by GitHub
parent 047c7ec182
commit 67d86bf3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 16 deletions

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=aliyundrive-webdav PKG_NAME:=aliyundrive-webdav
PKG_VERSION:=0.4.8 PKG_VERSION:=0.5.1
PKG_RELEASE:=1 PKG_RELEASE:=$(AUTORELESE)
PKG_LICENSE:=MIT PKG_LICENSE:=MIT
PKG_MAINTAINER:=messense <messense@icloud.com> PKG_MAINTAINER:=messense <messense@icloud.com>

View File

@ -11,3 +11,4 @@ config server
option cache_ttl '600' option cache_ttl '600'
option root '/' option root '/'
option no_trash '0' option no_trash '0'
option domain_id ''

View File

@ -25,15 +25,20 @@ start_service() {
local host=$(uci_get_by_type server host 127.0.0.1) local host=$(uci_get_by_type server host 127.0.0.1)
local port=$(uci_get_by_type server port 8080) local port=$(uci_get_by_type server port 8080)
local root=$(uci_get_by_type server root /) local root=$(uci_get_by_type server root /)
local no_trash=$(uci_get_by_type server no_trash 0) local domain_id=$(uci_get_by_type server domain_id)
local extra_options="-I" local extra_options="-I"
case "$no_trash" in
1|on|true|yes|enabled) if [[ ! -z "$domain_id" ]]; then
extra_options="$extra_options --no-trash" extra_options="$extra_options --domain-id $domain_id"
;; else
*) ;; case "$(uci_get_by_type server no_trash 0)" in
esac 1|on|true|yes|enabled)
extra_options="$extra_options --no-trash"
;;
*) ;;
esac
fi
procd_open_instance procd_open_instance
procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --cache-ttl $cache_ttl --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1" procd_set_param command /bin/sh -c "/usr/bin/$NAME $extra_options --host $host --port $port --root $root -S $read_buf_size --cache-size $cache_size --cache-ttl $cache_ttl --workdir /var/run/$NAME >>/var/log/$NAME.log 2>&1"

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-aliyundrive-webdav PKG_NAME:=luci-app-aliyundrive-webdav
PKG_VERSION:=0.4.8 PKG_VERSION:=0.5.1
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=MIT PKG_LICENSE:=MIT

View File

@ -1,8 +1,9 @@
local uci = luci.model.uci.cursor() local uci = luci.model.uci.cursor()
local m, e local m, e
m = Map("aliyundrive-webdav", translate("AliyunDrive WebDAV"), m = Map("aliyundrive-webdav")
translate("<a href=\"https://github.com/messense/aliyundrive-webdav\" target=\"_blank\">Project GitHub URL</a>")) m.title = translate("AliyunDrive WebDAV")
m.description = translate("<a href=\"https://github.com/messense/aliyundrive-webdav\" target=\"_blank\">Project GitHub URL</a>")
m:section(SimpleSection).template = "aliyundrive-webdav/aliyundrive-webdav_status" m:section(SimpleSection).template = "aliyundrive-webdav/aliyundrive-webdav_status"
@ -12,11 +13,11 @@ e.anonymous = true
enable = e:option(Flag, "enable", translate("Enable")) enable = e:option(Flag, "enable", translate("Enable"))
enable.rmempty = false enable.rmempty = false
refresh_token = e:option(Value, "refresh_token", translate("Refresh Token"), refresh_token = e:option(Value, "refresh_token", translate("Refresh Token"))
translate("<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>")) refresh_token.description = translate("<a href=\"https://github.com/messense/aliyundrive-webdav#%E8%8E%B7%E5%8F%96-refresh_token\" target=\"_blank\">How to get refresh token</a>")
root = e:option(Value, "root", translate("Root Directory"), root = e:option(Value, "root", translate("Root Directory"))
translate("Restrict access to a folder of aliyundrive, defaults to / which means no restrictions")) root.description = translate("Restrict access to a folder of aliyundrive, defaults to / which means no restrictions")
root.default = "/" root.default = "/"
host = e:option(Value, "host", translate("Host")) host = e:option(Value, "host", translate("Host"))
@ -46,6 +47,9 @@ cache_ttl.datatype = "uinteger"
no_trash = e:option(Flag, "no_trash", translate("Delete file permanently instead of trashing")) no_trash = e:option(Flag, "no_trash", translate("Delete file permanently instead of trashing"))
no_trash.rmempty = false no_trash.rmempty = false
domain_id = e:option(Value, "domain_id", translate("Domain ID"))
domain_id.description = translate("Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>")
debug = e:option(Flag, "debug", translate("Debug Mode")) debug = e:option(Flag, "debug", translate("Debug Mode"))
debug.rmempty = false debug.rmempty = false

View File

@ -66,3 +66,9 @@ msgstr "限制只能访问该云盘目录,默认为 / 表示不限制,注意
msgid "Delete file permanently instead of trashing" msgid "Delete file permanently instead of trashing"
msgstr "删除文件不放入回收站" msgstr "删除文件不放入回收站"
msgid "Domain ID"
msgstr "阿里云相册与云盘服务 domainId"
msgid "Input domain_id option will use <a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">Aliyun PDS</a> instead of <a href=\"https://www.aliyundrive.com\" target=\"_blank\">AliyunDrive</a>"
msgstr "填写此选项将使用<a href=\"https://www.aliyun.com/product/storage/pds\" target=\"_blank\">阿里云相册与网盘服务</a>而不是<a href=\"https://www.aliyundrive.com\" target=\"_blank\">阿里云盘</a>"