OSDN Git Service

luci-app-unblockneteasemusic: bump to 2.9
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 2 Apr 2021 13:27:50 +0000 (21:27 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Fri, 2 Apr 2021 13:28:21 +0000 (21:28 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
applications/luci-app-unblockneteasemusic/Makefile
applications/luci-app-unblockneteasemusic/luasrc/controller/unblockneteasemusic.lua
applications/luci-app-unblockneteasemusic/luasrc/model/cbi/unblockneteasemusic/unblockneteasemusic.lua
applications/luci-app-unblockneteasemusic/root/etc/init.d/unblockneteasemusic

index f793b9c..52f379d 100644 (file)
@@ -13,8 +13,8 @@ LUCI_DEPENDS:=+bash +busybox +coreutils +coreutils-nohup +curl +dnsmasq-full +ip
 LUCI_PKGARCH:=all
 
 PKG_NAME:=luci-app-unblockneteasemusic
-PKG_VERSION:=2.8
-PKG_RELEASE:=10
+PKG_VERSION:=2.9
+PKG_RELEASE:=1
 
 PKG_MAINTAINER:=CN_SZTL <cnsztl@immortalwrt.org>
 
index 3846300..0e3371f 100644 (file)
@@ -9,7 +9,10 @@ function index()
                return
        end
 
-       entry({"admin", "services", "unblockneteasemusic"},firstchild(), _("解除网易云音乐播放限制"), 50).dependent = false
+       local page
+       page = entry({"admin", "services", "unblockneteasemusic"},firstchild(), _("解除网易云音乐播放限制"), 50)
+       page.dependent = false
+       page.acl_depends = { "luci-app-unblockneteasemusic" }
 
        entry({"admin", "services", "unblockneteasemusic", "general"},cbi("unblockneteasemusic/unblockneteasemusic"), _("基本设定"), 1)
        entry({"admin", "services", "unblockneteasemusic", "upgrade"},form("unblockneteasemusic/unblockneteasemusic_upgrade"), _("更新组件"), 2).leaf = true
index b496ecc..83d4ef1 100644 (file)
@@ -1,5 +1,5 @@
 mp = Map("unblockneteasemusic", translate("解除网易云音乐播放限制"))
-mp.description = translate("原理:采用 [QQ/虾米/百度/酷狗/酷我/咪咕/JOOX] 等音源,替换网易云音乐 无版权/收费 歌曲链接<br/>具体使用方法参见:https://github.com/immortalwrt/luci-app-unblockneteasemusic")
+mp.description = translate("原理:采用 [QQ/百度/酷狗/酷我/咪咕/JOOX] 等音源,替换网易云音乐 无版权/收费 歌曲链接<br/>具体使用方法参见:https://github.com/immortalwrt/luci-app-unblockneteasemusic")
 
 mp:section(SimpleSection).template = "unblockneteasemusic/unblockneteasemusic_status"
 
@@ -19,11 +19,11 @@ music_source:value("qq", translate("QQ音乐"))
 music_source:value("kuwo", translate("酷我音乐"))
 music_source:value("migu", translate("咪咕音乐"))
 music_source:value("kugou", translate("酷狗音乐"))
-music_source:value("xiami", translate("虾米音乐"))
 music_source:value("baidu", translate("百度音乐"))
 music_source:value("joox", translate("JOOX音乐"))
 music_source:value("youtube", translate("Youtube音乐"))
 music_source:value("bilibili", translate("Bilibili音乐"))
+music_source:value("pyncmd", translate("网易云音乐(SVIP)"))
 music_source.description = translate("自定义模式下,多个音源请用空格隔开")
 music_source.default = "default"
 music_source.rmempty = false
@@ -48,6 +48,11 @@ use_custom_cookie.description = translate("使用自定义 Cookie 请求音源
 use_custom_cookie.default = 0
 use_custom_cookie.rmempty = false
 
+migu_cookie = s:option(Value, "migu_cookie", translate("Migu Cookie"))
+migu_cookie.description = translate("在 music.migu.cn 获取,需要migu_music_sid值")
+migu_cookie.datatype = "string"
+migu_cookie:depends("use_custom_cookie", 1)
+
 neteasemusic_cookie = s:option(Value, "neteasemusic_cookie", translate("NeteaseMusic Cookie"))
 neteasemusic_cookie.description = translate("在 music.163.com 获取,需要MUSIC_U值")
 neteasemusic_cookie.datatype = "string"
index fc67f9f..eda5f0f 100755 (executable)
@@ -45,6 +45,8 @@ https_port="$(uci_get_by_type "$NAME" "https_port" "5201")"
 endpoint_url="$(uci_get_by_type "$NAME" "endpoint_url" "http://music.163.com")"
 hijack_ways="$(uci_get_by_type "$NAME" "hijack_ways" "use_ipset")"
 
+migu_cookie="$(uci_get_by_type "$NAME" "migu_cookie")"
+[ -n "${migu_cookie}" ] && export MIGU_COOKIE="${migu_cookie}"
 neteasemusic_cookie="$(uci_get_by_type "$NAME" "neteasemusic_cookie")"
 qq_cookie="$(uci_get_by_type "$NAME" "qq_cookie")"
 [ -n "${qq_cookie}" ] && export QQ_COOKIE="${qq_cookie}"