mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-05 01:47:06 +08:00
luci-app-unblockmusic: add force replace lower than 320kbps option
This commit is contained in:
parent
052720804c
commit
f3339baf3c
@ -7,8 +7,8 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-unblockmusic
|
PKG_NAME:=luci-app-unblockmusic
|
||||||
PKG_VERSION:=2.3.1
|
PKG_VERSION:=2.3.5
|
||||||
PKG_RELEASE:=43
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS := \
|
PKG_CONFIG_DEPENDS := \
|
||||||
CONFIG_UnblockNeteaseMusic_Go \
|
CONFIG_UnblockNeteaseMusic_Go \
|
||||||
|
@ -52,6 +52,12 @@ flac.rmempty = false
|
|||||||
flac.description = translate("目前仅支持酷我、QQ、咪咕")
|
flac.description = translate("目前仅支持酷我、QQ、咪咕")
|
||||||
flac:depends("apptype", "nodejs")
|
flac:depends("apptype", "nodejs")
|
||||||
|
|
||||||
|
force = s:option(Flag, "force_enabled", translate("强制替换为高音质歌曲"))
|
||||||
|
force.default = 1
|
||||||
|
force.rmempty = false
|
||||||
|
force.description = translate("如果歌曲音质在 320Kbps 以内,则尝试强制替换为高音质版本")
|
||||||
|
force:depends("apptype", "nodejs")
|
||||||
|
|
||||||
o = s:option(Flag, "autoupdate")
|
o = s:option(Flag, "autoupdate")
|
||||||
o.title = translate("自动检查更新主程序")
|
o.title = translate("自动检查更新主程序")
|
||||||
o.default = 0
|
o.default = 0
|
||||||
|
@ -66,6 +66,7 @@ TYPE=$(uci_get_by_type unblockmusic musicapptype default)
|
|||||||
AUTOUPDATE=$(uci_get_by_type unblockmusic autoupdate 0)
|
AUTOUPDATE=$(uci_get_by_type unblockmusic autoupdate 0)
|
||||||
APPTYPE=$(uci_get_by_type unblockmusic apptype go)
|
APPTYPE=$(uci_get_by_type unblockmusic apptype go)
|
||||||
FLAC=$(uci_get_by_type unblockmusic flac_enabled 0)
|
FLAC=$(uci_get_by_type unblockmusic flac_enabled 0)
|
||||||
|
FORCE=$(uci_get_by_type unblockmusic force_enabled 0)
|
||||||
|
|
||||||
CLOUD=$(uci_get_by_type unblockmusic cloudserver "127.0.0.1:5200:5201")
|
CLOUD=$(uci_get_by_type unblockmusic cloudserver "127.0.0.1:5200:5201")
|
||||||
cloudadd=$(echo "$CLOUD" | awk -F ':' '{print $1}')
|
cloudadd=$(echo "$CLOUD" | awk -F ':' '{print $1}')
|
||||||
@ -171,7 +172,10 @@ start()
|
|||||||
|
|
||||||
if [ "$APPTYPE" == "nodejs" ]; then
|
if [ "$APPTYPE" == "nodejs" ]; then
|
||||||
if [ $FLAC -eq 1 ]; then
|
if [ $FLAC -eq 1 ]; then
|
||||||
export ENABLE_FLAC=true
|
export ENABLE_FLAC=true
|
||||||
|
fi
|
||||||
|
if [ $FORCE -eq 1 ]; then
|
||||||
|
sed -i '/item.code != 200/ { s/item.code != 200 || item.freeTrialInfo/item.br < 320000/g; }' /usr/share/UnblockNeteaseMusic/src/hook.js
|
||||||
fi
|
fi
|
||||||
node /usr/share/UnblockNeteaseMusic/app.js -e http://music.163.com -p 5200 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
node /usr/share/UnblockNeteaseMusic/app.js -e http://music.163.com -p 5200 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
||||||
node /usr/share/UnblockNeteaseMusic/app.js -e https://music.163.com -p 5203:5201 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
node /usr/share/UnblockNeteaseMusic/app.js -e https://music.163.com -p 5203:5201 $musictype >>/tmp/unblockmusic.log 2>&1 &
|
||||||
|
Loading…
x
Reference in New Issue
Block a user