Skip to content

Commit

Permalink
luci-app-unblockmusic: add a new function for go version (coolsnowwol…
Browse files Browse the repository at this point in the history
…f#5493)

* UnblockNeteaseMusic-Go: bump to 0.2.6

* luci-app-unblockmusic: drop outdated cloud servers

* luci-app-unblockmusic: add a new function from go version
  • Loading branch information
1715173329 authored Sep 20, 2020
1 parent 7b6163f commit a750363
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package/lean/UnblockNeteaseMusicGo/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=UnblockNeteaseMusicGo
PKG_VERSION:=0.2.5
PKG_VERSION:=0.2.6
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/cnsilvan/UnblockNeteaseMusic.git
PKG_SOURCE_VERSION:=aa1eb0186206671de9a6b4fa27d933bb306d4e25
PKG_SOURCE_VERSION:=7ff431267eb2b2683ea25e1b3860447aa7b482e9
PKG_MAINTAINER:=Silvan <[email protected]>

PKG_SOURCE_SUBDIR:=$(PKG_NAME)
Expand Down
2 changes: 1 addition & 1 deletion package/lean/luci-app-unblockmusic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-unblockmusic
PKG_VERSION:=2.3.5
PKG_RELEASE:=9
PKG_RELEASE:=10

PKG_CONFIG_DEPENDS := \
CONFIG_UnblockNeteaseMusic_Go \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ speedtype:depends("apptype", "go")

cloudserver = s:option(Value, "cloudserver", translate("服务器位置"))
cloudserver:value("cdn-shanghai.service.project-openwrt.eu.org:30000:30001", translate("[CTCGFW] 腾讯云上海(高音质)"))
cloudserver:value("hyird.xyz:30000:30001", translate("[hyird] 阿里云北京(高音质)"))
cloudserver:value("39.96.56.58:30000:30000", translate("[Sunsky] 阿里云北京(高音质)"))
cloudserver.description = translate("自定义服务器格式为 IP[域名]:HTTP端口:HTTPS端口<br />如果服务器为LAN内网IP,需要将这个服务器IP放入例外客户端 (不代理HTTP和HTTPS)")
cloudserver.default = "cdn-shanghai.service.project-openwrt.eu.org:30000:30001"
cloudserver.rmempty = true
cloudserver:depends("apptype", "cloud")

search_limit = s:option(Value, "search_limit", translate("搜索结果限制"))
search_limit.description = translate("在搜索页面显示其他平台搜索结果个数,可填(0-3)")
search_limit.default = "0"
search_limit:depends("apptype", "go")

flac = s:option(Flag, "flac_enabled", translate("启用无损音质"))
flac.default = "1"
flac.rmempty = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ ENABLE=$(uci_get_by_type unblockmusic enabled 0)
TYPE=$(uci_get_by_type unblockmusic musicapptype default)
AUTOUPDATE=$(uci_get_by_type unblockmusic autoupdate 0)
APPTYPE=$(uci_get_by_type unblockmusic apptype go)
SEARCHLIMIT=$(uci_get_by_type unblockmusic search_limit 0)
FLAC=$(uci_get_by_type unblockmusic flac_enabled 0)
FORCE=$(uci_get_by_type unblockmusic force_enabled 0)

Expand Down Expand Up @@ -187,7 +188,7 @@ start()
if [ $FLAC -eq 1 ]; then
ENABLE_FLAC="-b "
fi
UnblockNeteaseMusic $ENABLE_FLAC -p 5200 -sp 5201 -m 0 -c /usr/share/UnblockNeteaseMusicGo/server.crt -k /usr/share/UnblockNeteaseMusicGo/server.key -m 0 -e >>/tmp/unblockmusic.log 2>&1 &
UnblockNeteaseMusic $ENABLE_FLAC -p 5200 -sp 5201 -m 0 -c /usr/share/UnblockNeteaseMusicGo/server.crt -k /usr/share/UnblockNeteaseMusicGo/server.key -m 0 -e -sl ${SEARCHLIMIT} -l /tmp/unblockmusic.log &
echo "$(date -R) # UnblockNeteaseMusic Golang Version (http:5200, https:5201)" >>/tmp/unblockmusic.log
else
kill -9 $(busybox ps -w | grep 'sleep 60m' | grep -v grep | awk '{print $1}') >/dev/null 2>&1
Expand Down

0 comments on commit a750363

Please sign in to comment.