luci-app-aria2: fix incorrect "Extra Settings" section option name
authorRaymond <raymond.wanyoike@gmail.com>
Tue, 25 Feb 2020 20:14:14 +0000 (23:14 +0300)
committerJo-Philipp Wich <jo@mein.io>
Fri, 6 Nov 2020 23:33:15 +0000 (00:33 +0100)
The "Extra Settings" section `extra_setting` option name does not match what
the `net/aria2` package expects.

See:

- https://github.com/openwrt/packages/blob/openwrt-19.07/net/aria2/files/aria2.init#L311
- https://github.com/openwrt/packages/blob/openwrt-19.07/net/aria2/files/aria2.conf#L31

Causing the luci UI "Extra Settings" option to have no effect. This fix
renames `extra_setting` => `extra_settings`.

Signed-off-by: Raymond Wanyoike <raymond.wanyoike@gmail.com>
(cherry picked from commit 6709d3a355e6723b8a2ae4f5354c3e917d1b7ac8)

applications/luci-app-aria2/luasrc/model/cbi/aria2/config.lua
applications/luci-app-aria2/root/etc/uci-defaults/40_luci-aria2

index 17fdc566ce1342e6abe27759b220818c81a6cf46..8ef19531694d01ec7c38b6def7f5aca7497f3a77 100644 (file)
@@ -484,7 +484,7 @@ s = m:section(NamedSection, "main", "aria2", translate("Extra Settings"),
 s.addremove = false
 s.anonymous = true
 
-o = s:option(DynamicList, "extra_setting", translate("Settings list"),
+o = s:option(DynamicList, "extra_settings", translate("Settings list"),
        translate("List of extra settings. Format: option=value, eg. <code>netrc-path=/tmp/.netrc</code>."))
 o.placeholder = "option=value"
 
index fc6190d5ace26b01c02c85af2e06b45704c1ec53..b9fe68359121d68b918a904f698ac83c5e5ad3af 100755 (executable)
@@ -16,7 +16,7 @@ if [ ."$(uci -q get aria2.main)" != ."aria2" ]; then
                set aria2.main.config_dir="/var/etc/aria2"
                add_list aria2.main.header=""
                add_list aria2.main.bt_tracker=""
-               add_list aria2.main.extra_setting=""
+               add_list aria2.main.extra_settings=""
                commit aria2
        EOF
 fi