mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
commit
754d7fce84
23
licenses/BSL.txt
Normal file
23
licenses/BSL.txt
Normal file
@ -0,0 +1,23 @@
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="aixlog"
|
||||
PKG_VERSION="1.1.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/badaix/aixlog"
|
||||
PKG_URL="https://github.com/badaix/aixlog/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Header-only C++ logging library"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="asio"
|
||||
PKG_VERSION="9229964"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSL"
|
||||
PKG_SITE="http://think-async.com/Asio"
|
||||
PKG_URL="https://github.com/chriskohlhoff/asio/archive/$PKG_VERSION.zip"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Asio C++ Library"
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="popl"
|
||||
PKG_VERSION="1.0.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/badaix/popl"
|
||||
PKG_URL="https://github.com/badaix/popl/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Header-only C++ program options parser library"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="shairport-sync"
|
||||
PKG_VERSION="3.1.7"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="https://github.com/mikebrady/shairport-sync"
|
||||
PKG_URL="https://github.com/mikebrady/shairport-sync/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain alsa-lib avahi libconfig libdaemon openssl popt pulseaudio soxr"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="AirPlay audio player"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--with-alsa \
|
||||
--with-avahi \
|
||||
--with-convolution \
|
||||
--with-metadata \
|
||||
--with-pa \
|
||||
--with-pipe \
|
||||
--with-soxr \
|
||||
--with-ssl=openssl \
|
||||
--with-stdout"
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="snapcast"
|
||||
PKG_VERSION="0.13.0"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_SITE="https://github.com/badaix/snapcast"
|
||||
PKG_URL="https://github.com/badaix/snapcast/archive/v$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain aixlog alsa-lib asio avahi flac libvorbis popl"
|
||||
PKG_SECTION="tools"
|
||||
PKG_LONGDESC="Synchronous multi-room audio player"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_USE_CMAKE="no"
|
||||
|
||||
pre_configure_target() {
|
||||
cd ..
|
||||
rm -rf .$TARGET_NAME
|
||||
CXXFLAGS="$CXXFLAGS -pthread \
|
||||
-I$(get_build_dir aixlog)/include \
|
||||
-I$(get_build_dir asio)/asio/include \
|
||||
-I$(get_build_dir popl)/include"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
diff -Naur snapcast-0.13.0/client/Makefile snapcast-0.13.0.Makefiles/client/Makefile
|
||||
--- snapcast-0.13.0/client/Makefile 2018-03-04 21:43:32.000000000 +0100
|
||||
+++ snapcast-0.13.0.Makefiles/client/Makefile 2018-03-05 13:33:36.686709820 +0100
|
||||
@@ -78,10 +78,8 @@
|
||||
|
||||
else
|
||||
|
||||
-CXX = g++
|
||||
-STRIP = strip
|
||||
CXXFLAGS += -pthread -DHAS_VORBIS -DHAS_ALSA -DHAS_AVAHI -DHAS_DAEMON
|
||||
-LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -static-libgcc -static-libstdc++ -latomic
|
||||
+LDFLAGS += -lrt -lasound -lvorbis -lavahi-client -lavahi-common -logg
|
||||
OBJ += ../common/daemon.o player/alsaPlayer.o browseZeroConf/browseAvahi.o
|
||||
|
||||
endif
|
||||
diff -Naur snapcast-0.13.0/server/Makefile snapcast-0.13.0.Makefiles/server/Makefile
|
||||
--- snapcast-0.13.0/server/Makefile 2018-03-04 21:43:32.000000000 +0100
|
||||
+++ snapcast-0.13.0.Makefiles/server/Makefile 2018-03-05 13:34:03.530858350 +0100
|
||||
@@ -84,10 +84,8 @@
|
||||
|
||||
else
|
||||
|
||||
-CXX = g++
|
||||
-STRIP = strip
|
||||
CXXFLAGS += -DHAS_AVAHI -DHAS_DAEMON -pthread
|
||||
-LDFLAGS = -lrt -lvorbis -lvorbisenc -logg -lFLAC -lavahi-client -lavahi-common -static-libgcc -static-libstdc++
|
||||
+LDFLAGS = -lrt -lvorbis -lvorbisenc -logg -lFLAC -lavahi-client -lavahi-common
|
||||
OBJ += ../common/daemon.o publishZeroConf/publishAvahi.o
|
||||
|
||||
endif
|
2
packages/addons/service/snapclient/changelog.txt
Normal file
2
packages/addons/service/snapclient/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
100
|
||||
- Initial addon
|
BIN
packages/addons/service/snapclient/icon/icon.png
Normal file
BIN
packages/addons/service/snapclient/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
47
packages/addons/service/snapclient/package.mk
Normal file
47
packages/addons/service/snapclient/package.mk
Normal file
@ -0,0 +1,47 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="snapclient"
|
||||
PKG_VERSION="0.13.0"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_DEPENDS_TARGET="toolchain snapcast"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Snapclient: Synchronous multi-room audio client"
|
||||
PKG_LONGDESC="Snapclient ($PKG_VERSION) is a Snapcast client. Snapcast is a multi-room client-server audio system, where all clients are time synchronized with the server to play perfectly synced audioplays."
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Snapclient"
|
||||
PKG_ADDON_TYPE="xbmc.service.library"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
cp "$(get_build_dir snapcast)/client/snapclient" \
|
||||
"$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
}
|
40
packages/addons/service/snapclient/source/addon.py
Normal file
40
packages/addons/service/snapclient/source/addon.py
Normal file
@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import os.path
|
||||
import subprocess
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
|
||||
SNAPCLIENT = os.path.join(
|
||||
xbmcaddon.Addon().getAddonInfo('path'), 'bin', 'snapclient')
|
||||
|
||||
card = ''
|
||||
cards = []
|
||||
lines = subprocess.check_output([SNAPCLIENT, '--list']).splitlines()
|
||||
|
||||
for line in lines:
|
||||
if line != '':
|
||||
card = card + ' ' + line
|
||||
else:
|
||||
cards.append(card)
|
||||
card = ''
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
dialog.select(xbmcaddon.Addon().getLocalizedString(30015), cards)
|
||||
del dialog
|
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.snapclient
|
||||
|
||||
. /etc/os-release
|
||||
case "$LIBREELEC_ARCH" in
|
||||
RPi*.arm)
|
||||
if [ "$sc_a" == "true" ]; then
|
||||
ALSA="/proc/asound/ALSA"
|
||||
if [ ! -e "$ALSA" ]; then
|
||||
echo "Starting Raspberry Pi onboard audio"
|
||||
dtparam audio=on
|
||||
sleep 1
|
||||
fi
|
||||
if [ -e "$ALSA" ]; then
|
||||
echo "Setting Raspberry Pi onboard audio playback route"
|
||||
index="$(readlink $ALSA)"
|
||||
index="${index##*card}"
|
||||
amixer -c "$index" cset name="PCM Playback Route" "$sc_r"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$sc_h" ] && sc_H="--hostID $sc_h"
|
||||
[ -n "$sc_s" ] && sc_S="--soundcard $sc_s"
|
||||
|
||||
snapclient \
|
||||
--daemon "$sc_n" \
|
||||
$sc_H \
|
||||
--latency "$sc_l" \
|
||||
--port "$sc_p" \
|
||||
$sc_S
|
70
packages/addons/service/snapclient/source/default.py
Normal file
70
packages/addons/service/snapclient/source/default.py
Normal file
@ -0,0 +1,70 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
def systemctl(command):
|
||||
subprocess.call(
|
||||
['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
self.player = Player()
|
||||
|
||||
def onSettingsChanged(self):
|
||||
self.player.start('restart')
|
||||
|
||||
|
||||
class Player(xbmc.Player):
|
||||
|
||||
def __init__(self):
|
||||
super(Player, self).__init__(self)
|
||||
self.start('start')
|
||||
|
||||
def onPlayBackEnded(self):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
xbmc.sleep(500)
|
||||
if not self.isPlaying():
|
||||
systemctl('start')
|
||||
|
||||
def onPlayBackStarted(self):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
systemctl('stop')
|
||||
|
||||
def onPlayBackStopped(self):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
systemctl('start')
|
||||
|
||||
def start(self, command):
|
||||
if xbmcaddon.Addon().getSetting('sc_k') == 'true':
|
||||
if self.isPlaying():
|
||||
systemctl('stop')
|
||||
else:
|
||||
systemctl(command)
|
||||
else:
|
||||
systemctl(command)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Monitor().waitForAbort()
|
@ -0,0 +1,70 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: snapclient
|
||||
# Addon id: service.snapclient
|
||||
# Addon Provider: Team LibreELEC
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Snapclient"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "List sound cards"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Sound card"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Host ID"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30006"
|
||||
msgid "Latency"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30007"
|
||||
msgid "Kodi"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30008"
|
||||
msgid "Stop Snapclient when Kodi plays"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30009"
|
||||
msgid "Rasperry Pi"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30010"
|
||||
msgid "Manage onboard audio"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30011"
|
||||
msgid "Onboard audio playback route"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30012"
|
||||
msgid "Autodetect"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30013"
|
||||
msgid "Jack"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30014"
|
||||
msgid "HDMI"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30015"
|
||||
msgid "Available sound cards"
|
||||
msgstr ""
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="action" action="RunAddon(service.snapclient)"/>
|
||||
<setting label="30002" type="text" id="sc_s" default=""/>
|
||||
<setting label="30003" type="text" id="sc_h" default=""/>
|
||||
<setting label="30004" type="number" id="sc_p" default="1704"/>
|
||||
<setting label="30005" type="slider" id="sc_n" default="-3" range="-20,1,19" option="int"/>
|
||||
<setting label="30006" type="slider" id="sc_l" default="0" range="0,1,100" option="int"/>
|
||||
</category>
|
||||
<category label="30007">
|
||||
<setting label="30008" type="bool" id="sc_k" default="false"/>
|
||||
</category>
|
||||
<category label="30009">
|
||||
<setting label="30010" type="bool" id="sc_a" default="false"/>
|
||||
<setting label="30011" type="enum" id="sc_r" lvalues="30012|30013|30014" visible="eq(-1,true)"/>
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,10 @@
|
||||
<settings>
|
||||
<setting id="sc_a" value="false" />
|
||||
<setting id="sc_h" value="" />
|
||||
<setting id="sc_k" value="false" />
|
||||
<setting id="sc_l" value="0" />
|
||||
<setting id="sc_n" value="-3" />
|
||||
<setting id="sc_p" value="1704" />
|
||||
<setting id="sc_r" value="0" />
|
||||
<setting id="sc_s" value="" />
|
||||
</settings>
|
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Snapclient
|
||||
After=kodi.service network-online.target sound.target
|
||||
Requires=kodi.service network-online.target sound.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.snapclient/bin/snapclient.start
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
2
packages/addons/service/snapserver/changelog.txt
Normal file
2
packages/addons/service/snapserver/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
100
|
||||
- Initial addon
|
BIN
packages/addons/service/snapserver/icon/icon.png
Normal file
BIN
packages/addons/service/snapserver/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
48
packages/addons/service/snapserver/package.mk
Normal file
48
packages/addons/service/snapserver/package.mk
Normal file
@ -0,0 +1,48 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="snapserver"
|
||||
PKG_VERSION="0.13.0"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv3"
|
||||
PKG_DEPENDS_TARGET="toolchain shairport-sync snapcast"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Snapserver: Synchronous multi-room audio server"
|
||||
PKG_LONGDESC="Snapclient ($PKG_VERSION) is a Snapcast server. Snapcast is a multi-room client-server audio system, where all clients are time synchronized with the server to play perfectly synced audioplays."
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Snapserver"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p "$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
cp "$(get_build_dir shairport-sync)/.$TARGET_NAME/shairport-sync" \
|
||||
"$(get_build_dir snapcast)/server/snapserver" \
|
||||
"$ADDON_BUILD/$PKG_ADDON_ID/bin"
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.snapserver
|
||||
|
||||
case "$ss_ps" in
|
||||
Default)
|
||||
ss_us="--stream pipe:///tmp/snapfifo?name=Default"
|
||||
;;
|
||||
Airplay)
|
||||
ss_us="--stream airplay:///shairport-sync?name=Airplay"
|
||||
;;
|
||||
Spotify)
|
||||
ss_us="--stream spotify:///librespot?name=Spotify"
|
||||
;;
|
||||
esac
|
||||
|
||||
snapserver \
|
||||
--controlPort "$ss_cp" \
|
||||
--daemon "$ss_ni" \
|
||||
--port "$ss_sp" \
|
||||
$ss_us
|
39
packages/addons/service/snapserver/source/default.py
Normal file
39
packages/addons/service/snapserver/source/default.py
Normal file
@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - https://libreelec.tv
|
||||
# Copyright (C) 2018-present Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import subprocess
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
|
||||
|
||||
def systemctl(command):
|
||||
subprocess.call(
|
||||
['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])
|
||||
|
||||
|
||||
class Monitor(xbmc.Monitor):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
xbmc.Monitor.__init__(self)
|
||||
|
||||
def onSettingsChanged(self):
|
||||
systemctl('restart')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
Monitor().waitForAbort()
|
@ -0,0 +1,30 @@
|
||||
# Kodi Media Center language file
|
||||
# Addon Name: snapserver
|
||||
# Addon id: service.snapclient
|
||||
# Addon Provider: Team LibreELEC
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30000"
|
||||
msgid "Snapserver"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30001"
|
||||
msgid "Server port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30002"
|
||||
msgid "Control port"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30003"
|
||||
msgid "Priority"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30004"
|
||||
msgid "Preset"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30005"
|
||||
msgid "Stream"
|
||||
msgstr ""
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="30000">
|
||||
<setting label="30001" type="number" id="ss_sp" default="1704"/>
|
||||
<setting label="30002" type="number" id="ss_cp" default="1705"/>
|
||||
<setting label="30003" type="number" id="ss_ni" default="0" range="-20,1,19" option="int"/>
|
||||
<setting label="30004" type="select" id="ss_ps" values="Default|Airplay|Spotify|User"/>
|
||||
<setting label="30005" type="text" id="ss_us" default="--stream pipe:///tmp/snapfifo?name=default" visible="eq(-1,User)"/>
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,7 @@
|
||||
<settings>
|
||||
<setting id="ss_cp" value="1705" />
|
||||
<setting id="ss_ni" value="0" />
|
||||
<setting id="ss_ps" value="Airplay" />
|
||||
<setting id="ss_sp" value="1704" />
|
||||
<setting id="ss_us" value="--stream pipe:///tmp/snapfifo?name=default" />
|
||||
</settings>
|
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Snapserver
|
||||
After=kodi.service network-online.target sound.target
|
||||
Requires=kodi.service network-online.target sound.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/bin/sh /storage/.kodi/addons/service.snapserver/bin/snapserver.start
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user