update luci-app-unblockmusic

This commit is contained in:
CN_SZTL 2019-07-15 20:34:26 +08:00
parent 863cc91f38
commit 2b1a2670c0
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
7 changed files with 25 additions and 20 deletions

View File

@ -1,25 +1,26 @@
# Copyright (C) 2016 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
# This is a free software, use it under Apache Licene 2.0 & GNU General Public License v3.0.
#
# licheng
# www.maxlicheng.com
# 2019-06-08
#
# Second revision by [CTCGFW]Shell-Script
# 2019.07.15
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for Unblock NeteaseCloudMusic
LUCI_TITLE:=LuCI support for UnblockNeteaseMusic
LUCI_DEPENDS:=+node +bash +dnsmasq-full +ipset
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-unblockmusic
PKG_VERSION:=1.2
PKG_RELEASE:=37
PKG_RELEASE:=3
PKG_MAINTAINER:=<https://github.com/maxlicheng/luci-app-unblockmusic>
PKG_MAINTAINER:=<https://github.com/shell-script/luci-app-unblockmusic>
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature

View File

@ -6,7 +6,7 @@ function index()
return
end
entry({"admin", "services", "unblockmusic"},firstchild(), _("解锁网易云灰色歌曲"), 50).dependent = false
entry({"admin", "services", "unblockmusic"},firstchild(), _("恢复网易云音乐无版权歌曲"), 50).dependent = false
entry({"admin", "services", "unblockmusic", "general"},cbi("unblockmusic"), _("Base Setting"), 1)
entry({"admin", "services", "unblockmusic", "log"},form("unblockmusiclog"), _("Log"), 2)

View File

@ -1,6 +1,6 @@
mp = Map("unblockmusic", translate("解锁网易云灰色歌曲"))
mp.description = translate("原理:采用 [网易云旧链/QQ/虾米/百度/酷狗/酷我/咕咪/JOOX] 等音源,替换网易云变灰歌曲链接<br/>具体使用方法可查看GitHubhttps://github.com/shell-script/luci-app-unblockmusic")
mp = Map("unblockmusic", translate("恢复网易云音乐无版权歌曲"))
mp.description = translate("原理:采用 [网易云旧链/QQ/虾米/百度/酷狗/酷我/咕咪/JOOX] 等音源,替换网易云音乐无版权歌曲链接<br/>具体使用方法参见https://github.com/shell-script/luci-app-unblockmusic")
mp:section(SimpleSection).template = "unblockmusic/unblockmusic_status"
@ -8,19 +8,20 @@ s = mp:section(TypedSection, "unblockmusic")
s.anonymous=true
s.addremove=false
enabled = s:option(Flag, "enabled", translate("启用解锁"))
enabled = s:option(Flag, "enabled", translate("启用UnblockNeteaseMusic"))
enabled.description = translate("启用本插件以恢复网易云音乐无版权歌曲")
enabled.default = 0
enabled.rmempty = false
enabled = s:option(Flag, "strict_mode", translate("启用严格模式"))
enabled.description = translate("若将服务部署到公网,则强烈建议使用严格模式,此模式下仅放行网易云音乐所属域名的请求")
enabled.default = 0
enabled.default = 1
enabled.rmempty = false
enabled:depends("enabled", 1)
enabled = s:option(Flag, "enable_ipset_forward", translate("启用IPSet转发相关流量"))
enabled.description = translate("开启后,所有网易云音乐流量都会重定向到UnblockNeteaseMusic进行处理但会导致无法正常访问云音乐网页端")
enabled.default = 0
enabled.description = translate("开启后,所有网易云音乐流量都会重定向到UnblockNeteaseMusic进行处理但会导致无法正常访问云音乐网页端")
enabled.default = 1
enabled.rmempty = false
enabled:depends("enabled", 1)
@ -35,15 +36,18 @@ speedtype:value("kuwo", translate("酷我音乐"))
speedtype:value("migu", translate("咕咪音乐"))
speedtype:value("joox", translate("JOOX音乐"))
speedtype:value("all", translate("所有平台"))
speedtype.description = translate("音源调用接口")
speedtype.default = "all"
speedtype:depends("enabled", 1)
account = s:option(Value, "port", translate("端口号"))
account = s:option(Value, "port", translate("监听端口"))
account.description = translate("UnblockNeteaseMusic监听的端口不可与其他程序共用一个端口")
account.default = "5200"
account.datatype = "string"
account:depends("enabled", 1)
enabled = s:option(Flag, "set_netease_server_ip", translate("自定义网易云服务器IP"))
enabled.description = translate("自定义网易云服务器IP地址如使用Hosts方式则必选否则将会导致连接死循环")
enabled.description = translate("如使用Hosts方式则必选否则将会导致连接死循环")
enabled.default = 0
enabled.rmempty = false
enabled:depends("enabled", 1)

View File

@ -11,4 +11,4 @@ function t.cfgvalue()
end
t.readonly="readonly"
return f
return f

View File

@ -4,10 +4,10 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[unblockmusic]], [[status]])%>', n
var tb = document.getElementById('unblockmusic_status');
if (data && tb) {
if (data.running) {
var links = '<em><b><font color=green>Unblock NeteaseCloudMusic <%:RUNNING%></font></b></em>';
var links = '<em><b><font color=green>UnblockNeteaseMusic <%:RUNNING%></font></b></em>';
tb.innerHTML = links;
} else {
tb.innerHTML = '<em><b><font color=red>Unblock NeteaseCloudMusic <%:NOT RUNNING%></font></b></em>';
tb.innerHTML = '<em><b><font color=red>UnblockNeteaseMusic <%:NOT RUNNING%></font></b></em>';
}
}
}
@ -19,4 +19,4 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[unblockmusic]], [[status]])%>', n
<p id="unblockmusic_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
</fieldset>

View File

@ -3,7 +3,7 @@ config unblockmusic
option enabled '0'
option strict_mode '0'
option enable_ipset_forward '0'
option musicapptype 'all'
option musicapptype 'default'
option port '5200'
option set_netease_server_ip '0'
option netease_server_ip '59.111.181.38'

View File

@ -40,7 +40,7 @@ iptables -t nat -A prerouting_rule -i br-lan -p tcp -m set --match-set music dst
/etc/init.d/firewall restart >/dev/null 2>&1
fi
/usr/share/unblockmusic/logcheck.sh >/dev/null 2>&1 &
/usr/share/unblockmusic/logcheck.sh >/dev/null 2>&1&
}
stop()