OSDN Git Service

luci-app-unblockneteasemusic: bump to 2.10-3
authorTianling Shen <cnsztl@immortalwrt.org>
Sun, 22 Aug 2021 17:53:41 +0000 (01:53 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Sun, 22 Aug 2021 17:53:41 +0000 (01:53 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
applications/luci-app-unblockneteasemusic/Makefile
applications/luci-app-unblockneteasemusic/root/etc/init.d/unblockneteasemusic

index ad79f42..11f1e22 100644 (file)
@@ -10,7 +10,7 @@ LUCI_PKGARCH:=all
 
 PKG_NAME:=luci-app-unblockneteasemusic
 PKG_VERSION:=2.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
 
index b435ce1..acc2feb 100755 (executable)
@@ -23,13 +23,13 @@ is_enabled() {
 config_padding_arg() {
        local value
        config_get value "$1" "$2" $4
-       [ -n "$value" ] && export $(eval echo "$2")="$3 $value"
+       [ -n "$value" ] && export "$2"="$3 $value"
 }
 
 append_param_env() {
        local value
        config_get value "$1" "$2"
-       [ -n "$value" ] && export $(eval echo "$3")="$value"
+       [ -n "$value" ] && export "$3"="$value"
 }
 
 uci_get_by_name() {
@@ -82,7 +82,11 @@ start()
 
        local music_source
        config_get music_source "config" "music_source" "default"
-       [ "${music_source}" != "default" ] && music_source="-o ${music_source}"
+       if [ "${music_source}" = "default" ]; then
+              unset music_source
+       else
+              music_source="-o ${music_source}"
+       fi
 
        is_enabled "config" "strict_mode" && strict_mode="-s"
        config_padding_arg "config" "endpoint_url" "-e" "https://music.163.com"