mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
package: enhance luci-app-airplay2 (#7990)
feature: add allow_session_interruption and session_timeout option bugfix: restart shairport-sync when new setting submitted on luci enhance: some text change and file rename
This commit is contained in:
parent
3a5b730796
commit
81d712944d
@ -30,7 +30,7 @@ pw:depends("auth", "1")
|
||||
|
||||
interpolation=s:option(ListValue, "interpolation", translate("Interpolation"))
|
||||
interpolation:value("basic", translate("Internal Basic Resampler"))
|
||||
interpolation:value("soxr", translate("High quality SoX Resampler"))
|
||||
interpolation:value("soxr", translate("High quality SoX Resampler (fast CPU required)"))
|
||||
|
||||
port=s:option(Value, "port", translate("Port"))
|
||||
port.rmempty = false
|
||||
@ -38,8 +38,9 @@ port.datatype = "port"
|
||||
|
||||
alsa_output_device=s:option(ListValue, "alsa_output_device", translate("Alsa Output Device"))
|
||||
alsa_output_device:value("", translate("default"))
|
||||
alsa_output_device:value("hw:0", translate("1st Soundcard"))
|
||||
alsa_output_device:value("hw:1", translate("2nd Soundcard"))
|
||||
alsa_output_device:value("hw:0", translate("1st Soundcard (hw:0)"))
|
||||
alsa_output_device:value("hw:1", translate("2nd Soundcard (hw:1)"))
|
||||
alsa_output_device:value("hw:2", translate("3nd Soundcard (hw:2)"))
|
||||
|
||||
alsa_mixer_control_name=s:option(ListValue, "alsa_mixer_control_name", translate("Alsa Mixer Control Name"))
|
||||
alsa_mixer_control_name:value("", translate("default"))
|
||||
@ -55,4 +56,11 @@ alsa_output_rate:value("352800", translate("352.8Khz"))
|
||||
alsa_buffer_length=s:option(Value, "alsa_buffer_length", translate("Alsa Buffer Length"))
|
||||
alsa_buffer_length.default = "6615"
|
||||
|
||||
allow_session_interruption=s:option(ListValue, "sesctl_session_interruption", translate("Allow session interruption"))
|
||||
allow_session_interruption:value("no", translate("Not allow"))
|
||||
allow_session_interruption:value("yes", translate("Allow"))
|
||||
|
||||
session_timeout=s:option(Value, "sesctl_session_timeout", translate("Session timeout"))
|
||||
session_timeout.default = "120"
|
||||
|
||||
return m
|
@ -37,7 +37,7 @@ msgstr "音频重采样"
|
||||
msgid "Internal Basic Resampler"
|
||||
msgstr "内置"
|
||||
|
||||
msgid "High quality SoX Resampler"
|
||||
msgid "High quality SoX Resampler (fast CPU required)"
|
||||
msgstr "高质量 SoX 采样器(需要强力的CPU)"
|
||||
|
||||
msgid "Alsa Output Device"
|
||||
@ -46,14 +46,29 @@ msgstr "音频输出设备"
|
||||
msgid "Alsa Mixer Control Name"
|
||||
msgstr "硬件音量控制器名称"
|
||||
|
||||
msgid "1st Soundcard"
|
||||
msgstr "第 1 张声卡"
|
||||
msgid "1st Soundcard (hw:0)"
|
||||
msgstr "第 1 张声卡 (hw:0)"
|
||||
|
||||
msgid "2nd Soundcard"
|
||||
msgstr "第 2 张声卡"
|
||||
msgid "2nd Soundcard (hw:1)"
|
||||
msgstr "第 2 张声卡 (hw:1)"
|
||||
|
||||
msgid "3nd Soundcard (hw:2)"
|
||||
msgstr "第 3 张声卡 (hw:2)"
|
||||
|
||||
msgid "Alsa Output Rate"
|
||||
msgstr "音频输出采样率"
|
||||
|
||||
msgid "Alsa Buffer Length"
|
||||
msgstr "音频缓冲区长度"
|
||||
|
||||
msgid "Allow session interruption"
|
||||
msgstr "允许其他设备打断当前播放会话"
|
||||
|
||||
msgid "Not allow"
|
||||
msgstr "不允许"
|
||||
|
||||
msgid "Allow"
|
||||
msgstr "允许"
|
||||
|
||||
msgid "Session timeout"
|
||||
msgstr "会话超时"
|
||||
|
@ -8,4 +8,6 @@ config shairport-sync 'shairport_sync'
|
||||
option alsa_output_rate 'auto'
|
||||
option alsa_buffer_length '6615'
|
||||
option enabled '0'
|
||||
option sesctl_session_interruption 'no'
|
||||
option sesctl_session_timeout '120'
|
||||
|
||||
|
@ -137,6 +137,11 @@ service_triggers() {
|
||||
procd_add_reload_trigger "shairport-sync"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load shairport-sync
|
||||
config_foreach start_instance shairport-sync
|
||||
|
Loading…
Reference in New Issue
Block a user