Delete luci-app-airplay2 directory
This commit is contained in:
parent
1a88d24929
commit
f19949046e
@ -1,17 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Luci for Apple Airplay2 Receiver
|
||||
LUCI_DEPENDS:=+alsa-utils +shairport-sync-openssl
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=10
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
@ -1,23 +0,0 @@
|
||||
-- Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.controller.shairport-sync", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/shairport-sync") then
|
||||
return
|
||||
end
|
||||
|
||||
local page = entry({"admin", "services", "shairport-sync"}, cbi("shairport-sync"), _("AirPlay 2 Receiver"))
|
||||
page.dependent = true
|
||||
page.acl_depends = { "luci-app-airplay2" }
|
||||
|
||||
entry({"admin", "services", "shairport-sync", "status"}, call("act_status")).leaf = true
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local e = {}
|
||||
e.running = luci.sys.call("pgrep shairport-sync >/dev/null") == 0
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
@ -1,67 +0,0 @@
|
||||
-- Copyright 2020 Lean <coolsnowwolf@gmail.com>
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
m = Map("shairport-sync", translate("Apple AirPlay 2 Receiver"))
|
||||
m.description = translate("Apple AirPlay 2 Receiver is a simple AirPlay server implementation")
|
||||
|
||||
m:section(SimpleSection).template = "shairport-sync/shairport-sync_status"
|
||||
|
||||
s = m:section(TypedSection, "shairport-sync")
|
||||
s.addremove = false
|
||||
s.anonymous = true
|
||||
|
||||
enable = s:option(Flag, "enabled", translate("Enabled"))
|
||||
enable.default = "0"
|
||||
enable.rmempty = false
|
||||
|
||||
respawn = s:option(Flag, "respawn", translate("Respawn"))
|
||||
respawn.default = false
|
||||
|
||||
apname = s:option(Value, "name", translate("Airport Name"))
|
||||
apname.rmempty = false
|
||||
|
||||
auth = s:option(Flag, "auth", translate("Password Auth"))
|
||||
auth.default = false
|
||||
|
||||
pw = s:option(Value, "password", translate("Password"))
|
||||
pw.rmempty = true
|
||||
pw.password = true
|
||||
pw.default = ""
|
||||
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 (fast CPU required)"))
|
||||
|
||||
port = s:option(Value, "port", translate("Port"))
|
||||
port.rmempty = false
|
||||
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 (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"))
|
||||
alsa_mixer_control_name:value("PCM", translate("PCM"))
|
||||
|
||||
alsa_output_rate = s:option(ListValue, "alsa_output_rate", translate("Alsa Output Rate"))
|
||||
alsa_output_rate:value("auto", translate("auto"))
|
||||
alsa_output_rate:value("44100", translate("44.1Khz"))
|
||||
alsa_output_rate:value("88200", translate("88.2Khz"))
|
||||
alsa_output_rate:value("176400", translate("176.4Khz"))
|
||||
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
|
@ -1,22 +0,0 @@
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
XHR.poll(3, '<%=url([[admin]], [[services]], [[shairport-sync]], [[status]])%>', null,
|
||||
function(x, data) {
|
||||
var tb = document.getElementById('shairport-sync_status');
|
||||
if (data && tb) {
|
||||
if (data.running) {
|
||||
var links = '<em><b><font color=green>Apple AirPlay 2 Receiver <%:RUNNING%></font></b></em>';
|
||||
tb.innerHTML = links;
|
||||
} else {
|
||||
tb.innerHTML = '<em><b><font color=red>Apple AirPlay 2 Receiver <%:NOT RUNNING%></font></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]>
|
||||
</script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<p id="shairport-sync_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
@ -1 +0,0 @@
|
||||
zh_Hans
|
@ -1,74 +0,0 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-06-23 20:16+0800\n"
|
||||
"PO-Revision-Date: 2015-06-23 20:17+0800\n"
|
||||
"Last-Translator: coolsnowwolf <coolsnowwolf@gmail.com>\n"
|
||||
"Language-Team: PandoraBox Team\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 1.8.1\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
msgid "AirPlay 2 Receiver"
|
||||
msgstr "AirPlay 2 音频接收器"
|
||||
|
||||
msgid "Respawn"
|
||||
msgstr "进程守护"
|
||||
|
||||
msgid "Apple AirPlay 2 Receiver"
|
||||
msgstr "Apple AirPlay 2 无损音频接收服务器"
|
||||
|
||||
msgid "Apple AirPlay 2 Receiver is a simple AirPlay server implementation"
|
||||
msgstr "Apple AirPlay 2 是一个强大易用的无损音频服务器( iOS/MacOSX 原生支持)"
|
||||
|
||||
msgid "Airport Name"
|
||||
msgstr "音频接收器名称"
|
||||
|
||||
msgid "Password Auth"
|
||||
msgstr "开启密码认证"
|
||||
|
||||
msgid "Interpolation"
|
||||
msgstr "音频重采样"
|
||||
|
||||
msgid "Internal Basic Resampler"
|
||||
msgstr "内置"
|
||||
|
||||
msgid "High quality SoX Resampler (fast CPU required)"
|
||||
msgstr "高质量 SoX 采样器(需要强力的CPU)"
|
||||
|
||||
msgid "Alsa Output Device"
|
||||
msgstr "音频输出设备"
|
||||
|
||||
msgid "Alsa Mixer Control Name"
|
||||
msgstr "硬件音量控制器名称"
|
||||
|
||||
msgid "1st Soundcard (hw:0)"
|
||||
msgstr "第 1 张声卡 (hw:0)"
|
||||
|
||||
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 "会话超时"
|
@ -1,2 +0,0 @@
|
||||
defaults.pcm.dmix.rate 44100 # Force 44.1 KHz
|
||||
defaults.pcm.dmix.format S16_LE # Force 16 bits
|
@ -1,12 +0,0 @@
|
||||
|
||||
config shairport-sync 'shairport_sync'
|
||||
option respawn '1'
|
||||
option name 'AirPlay 2 On OpenWrt'
|
||||
option auth '0'
|
||||
option interpolation 'basic'
|
||||
option port '5050'
|
||||
option alsa_output_rate 'auto'
|
||||
option alsa_buffer_length '6615'
|
||||
option sesctl_session_interruption 'no'
|
||||
option sesctl_session_timeout '120'
|
||||
option enabled '0'
|
@ -1,155 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
append_num() {
|
||||
local cfg="$1"
|
||||
local file="$2"
|
||||
local var="$3"
|
||||
local opt="$4"
|
||||
local def="$5"
|
||||
local val
|
||||
|
||||
config_get val "$cfg" "$var"
|
||||
[ -n "$val" -o -n "$def" ] && echo -e "\t$opt = ${val:-$def};" >> $file
|
||||
}
|
||||
append_str() {
|
||||
local cfg="$1"
|
||||
local file="$2"
|
||||
local var="$3"
|
||||
local opt="$4"
|
||||
local def="$5"
|
||||
local val
|
||||
|
||||
config_get val "$cfg" "$var"
|
||||
[ -n "$val" -o -n "$def" ] && echo -e "\t$opt = \"${val:-$def}\";" >> $file
|
||||
}
|
||||
|
||||
start_instance() {
|
||||
local cfg=$1
|
||||
local conf_custom conf_file aux
|
||||
|
||||
config_get_bool aux "$cfg" 'enabled' '0'
|
||||
[ "$aux" = 0 ] && return 1
|
||||
|
||||
config_get_bool conf_custom "$cfg" 'conf_custom' '0'
|
||||
config_get conf_file "$cfg" "conf_file"
|
||||
if [ $conf_custom -ne 1 ] && [ ! -n "$conf_file" ]; then
|
||||
mkdir -p /var/etc
|
||||
conf_file="/var/etc/shairport-sync-${cfg}.conf"
|
||||
|
||||
echo -e "// Automatically generated from UCI config\n" > $conf_file
|
||||
|
||||
# General
|
||||
echo -e "general =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_str "$cfg" "$conf_file" name "name"
|
||||
append_str "$cfg" "$conf_file" password "password"
|
||||
append_str "$cfg" "$conf_file" interpolation "interpolation"
|
||||
append_str "$cfg" "$conf_file" output_backend "output_backend"
|
||||
append_str "$cfg" "$conf_file" mdns_backend "mdns_backend"
|
||||
append_num "$cfg" "$conf_file" port "port" "5050"
|
||||
append_num "$cfg" "$conf_file" udp_port_base "udp_port_base"
|
||||
append_num "$cfg" "$conf_file" udp_port_range "udp_port_range"
|
||||
append_str "$cfg" "$conf_file" statistics "statistics"
|
||||
append_num "$cfg" "$conf_file" drift "drift"
|
||||
append_num "$cfg" "$conf_file" resync_threshold "resync_threshold"
|
||||
append_num "$cfg" "$conf_file" log_verbosity "log_verbosity"
|
||||
append_str "$cfg" "$conf_file" ignore_volume_control "ignore_volume_control"
|
||||
append_num "$cfg" "$conf_file" volume_range_db "volume_range_db"
|
||||
append_str "$cfg" "$conf_file" regtype "regtype"
|
||||
append_str "$cfg" "$conf_file" playback_mode "playback_mode"
|
||||
echo -e "};\n" >> $conf_file
|
||||
|
||||
# Metadata
|
||||
echo -e "metadata =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_str "$cfg" "$conf_file" metadata_enabled "enabled"
|
||||
append_str "$cfg" "$conf_file" metadata_cover_art "include_cover_art"
|
||||
append_str "$cfg" "$conf_file" metadata_pipe_name "pipe_name"
|
||||
append_num "$cfg" "$conf_file" metadata_pipe_timeout "pipe_timeout"
|
||||
append_str "$cfg" "$conf_file" metadata_socket_address "socket_address"
|
||||
append_num "$cfg" "$conf_file" metadata_socket_port "socket_port"
|
||||
append_num "$cfg" "$conf_file" metadata_socket_msglength "socket_msglength"
|
||||
echo -e "};\n" >> $conf_file
|
||||
|
||||
# Session control
|
||||
echo -e "sessioncontrol =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_str "$cfg" "$conf_file" sesctl_run_before_play_begins "run_this_before_play_begins"
|
||||
append_str "$cfg" "$conf_file" sesctl_run_after_play_ends "run_this_after_play_ends"
|
||||
append_str "$cfg" "$conf_file" sesctl_wait_for_completion "wait_for_completion"
|
||||
append_str "$cfg" "$conf_file" sesctl_session_interruption "allow_session_interruption"
|
||||
append_num "$cfg" "$conf_file" sesctl_session_timeout "session_timeout"
|
||||
echo -e "};\n" >> $conf_file
|
||||
|
||||
# Alsa audio back end
|
||||
echo -e "alsa =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_str "$cfg" "$conf_file" alsa_output_device "output_device"
|
||||
append_str "$cfg" "$conf_file" alsa_mixer_control_name "mixer_control_name"
|
||||
append_str "$cfg" "$conf_file" alsa_mixer_device "mixer_device"
|
||||
append_str "$cfg" "$conf_file" alsa_output_rate "output_rate" "44100"
|
||||
append_num "$cfg" "$conf_file" alsa_latency_offset "audio_backend_latency_offset"
|
||||
append_num "$cfg" "$conf_file" alsa_buffer_length "audio_backend_buffer_desired_length"
|
||||
append_str "$cfg" "$conf_file" alsa_disable_synchronization "disable_synchronization"
|
||||
append_num "$cfg" "$conf_file" alsa_period_size "period_size"
|
||||
append_num "$cfg" "$conf_file" alsa_buffer_size "buffer_size"
|
||||
echo -e "};\n" >> $conf_file
|
||||
|
||||
# Pipe audio back end
|
||||
echo -e "pipe =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_str "$cfg" "$conf_file" pipe_name "name"
|
||||
append_num "$cfg" "$conf_file" pipe_latency_offset "audio_backend_latency_offset"
|
||||
append_num "$cfg" "$conf_file" pipe_buffer_length "audio_backend_buffer_desired_length"
|
||||
echo -e "};\n" >> $conf_file
|
||||
|
||||
# Stdout audio back end
|
||||
echo -e "stdout =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_num "$cfg" "$conf_file" stdout_latency_offset "audio_backend_latency_offset"
|
||||
append_num "$cfg" "$conf_file" stdout_buffer_length "audio_backend_buffer_desired_length"
|
||||
echo -e "};\n" >> $conf_file
|
||||
|
||||
# AO audio back end
|
||||
echo -e "ao =" >> $conf_file
|
||||
echo -e "{" >> $conf_file
|
||||
append_num "$cfg" "$conf_file" ao_latency_offset "audio_backend_latency_offset"
|
||||
append_num "$cfg" "$conf_file" ao_buffer_length "audio_backend_buffer_desired_length"
|
||||
echo -e "};\n" >> $conf_file
|
||||
fi
|
||||
|
||||
procd_open_instance
|
||||
|
||||
procd_set_param command /usr/bin/shairport-sync
|
||||
procd_append_param command -c $conf_file
|
||||
|
||||
config_get_bool aux "$cfg" 'respawn' '0'
|
||||
[ "$aux" = 1 ] && procd_set_param respawn
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "shairport-sync"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load shairport-sync
|
||||
config_foreach start_instance shairport-sync
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
boot() {
|
||||
amixer set Master unmute
|
||||
amixer set Master 100%
|
||||
amixer set PCM 100%
|
||||
start
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"luci-app-airplay2": {
|
||||
"description": "Grant UCI access for luci-app-airplay2",
|
||||
"read": {
|
||||
"uci": [ "shairport-sync" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "shairport-sync" ]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user