diff --git a/packages/addons/service/spotify-connect-web/changelog.txt b/packages/addons/service/spotify-connect-web/changelog.txt deleted file mode 100644 index 0c63aada54..0000000000 --- a/packages/addons/service/spotify-connect-web/changelog.txt +++ /dev/null @@ -1,19 +0,0 @@ -8.0.103 -- Handle PCM specified as a:CARD=c,DEV=d - -8.0.102 -- Add passwordless/mutiuser login - -8.0.101 -- Use mixer card index -- Add instructions to the addon settings -- Add a configuration wizard to assist with ALSA configuration -- Enable setting initial volume -- Activate onboard audio interface if no audio interface is active -- Activate known audio interface if selected but inactive -- Only set the playback route for RPi2 onboard audio interface -- Remove default settings -- Fix the erroneous bit rate setting - -8.0.100 -- Initial addon diff --git a/packages/addons/service/spotify-connect-web/icon/icon.png b/packages/addons/service/spotify-connect-web/icon/icon.png deleted file mode 100644 index 17f274c329..0000000000 Binary files a/packages/addons/service/spotify-connect-web/icon/icon.png and /dev/null differ diff --git a/packages/addons/service/spotify-connect-web/package.mk b/packages/addons/service/spotify-connect-web/package.mk deleted file mode 100644 index ab53d640d4..0000000000 --- a/packages/addons/service/spotify-connect-web/package.mk +++ /dev/null @@ -1,55 +0,0 @@ -################################################################################ -# This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2016 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 . -################################################################################ - -PKG_NAME="spotify-connect-web" -PKG_VERSION="0.0.3-alpha" -PKG_REV="103" -PKG_ARCH="arm" -PKG_ADDON_PROJECTS="RPi2 WeTek_Core WeTek_Play" -PKG_LICENSE="prop." -PKG_SITE="https://github.com/Fornoth/spotify-connect-web" -PKG_URL="https://github.com/Fornoth/spotify-connect-web/releases/download/$PKG_VERSION/${PKG_NAME}_$PKG_VERSION.tar.gz" -PKG_SOURCE_DIR="spotify-connect-web" -PKG_DEPENDS_TARGET="toolchain avahi" -PKG_SECTION="service" -PKG_SHORTDESC="Spotify Connect Web: play Spotify through LibreELEC" -PKG_LONGDESC="Spotify Connect Web ($PKG_VERSION) plays Spotify through LibreELEC, using a Spotify app as a remote." -PKG_AUTORECONF="no" - -PKG_IS_ADDON="yes" -PKG_ADDON_NAME="Spotify Connect Web" -PKG_ADDON_TYPE="xbmc.service" -PKG_MAINTAINER="Anton Voyl (awiouy)" - -make_target() { - : # nop -} - -makeinstall_target() { - : # nop -} - -addon() { - mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin - - cp -P $(get_build_dir avahi)/avahi-utils/.libs/avahi-publish \ - $ADDON_BUILD/$PKG_ADDON_ID/bin/ - - cp -PR $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID/ - rm $ADDON_BUILD/$PKG_ADDON_ID/libasound.so.2 -} diff --git a/packages/addons/service/spotify-connect-web/source/bin/spotify-connect-web.start b/packages/addons/service/spotify-connect-web/source/bin/spotify-connect-web.start deleted file mode 100755 index 7b2ee0874e..0000000000 --- a/packages/addons/service/spotify-connect-web/source/bin/spotify-connect-web.start +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/sh -################################################################################ -# This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2016 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 . -################################################################################ - -. /etc/os-release -. /etc/profile -oe_setup_addon service.spotify-connect-web - -chmod +x "$ADDON_DIR/spotify-connect-web" -mkdir -p "$ADDON_HOME" - -activate_card() { - if [ -e "/proc/asound/$1" ] - then - return - fi - if [ "$LIBREELEC_ARCH" == "RPi2.arm" -a "$1" == "ALSA" ] - then - dtparam audio=on - sleep 1 - else - echo "Do not know how to activate card $1 on $LIBREELEC_ARCH" - exit - fi -} - -if [ ! "$(cat /proc/asound/pcm 2> /dev/null)" ] -then - if [ "$LIBREELEC_ARCH" == "RPi2.arm" ] - then - activate_card "ALSA" - else - echo "Do not how how to activate an audio interface on $LIBREELEC_ARCH" - ko="ko" - fi -fi - -if [ ! -f "$ADDON_HOME/spotify_appkey.key" ] -then - echo "Key not found" - ko="ko" -fi - -if [ ! "$scw_o" ] -then - echo "Playback device not set" - ko="ko" -fi - -if [ "$ko" ] -then - exit -fi - -case "$scw_o" in - - *:CARD=*) - card="${scw_o##*:CARD=}" - card="${card%%,*}" - activate_card "$card" - index="$(readlink /proc/asound/$card)" - index="${index##*card}" - ;; - - hw:*,*) - echo "The hw:d,s specification is unreliable, use device:CARD=card instead" - index="${scw_o##hw:}" - index="${index%%,*}" - card="card$index" - activate_card "$card" - ;; - - *) - echo "Unknown playback device specification $swc_o" - exit - ;; - -esac - -[ "$scw_m" ] && [ "$vol_0" ] && amixer -c "$index" set "$scw_m" "$vol_0%" - -if [ "$LIBREELEC_ARCH" == "RPi2.arm" -a \ - "$(readlink /proc/asound/ALSA)" == "card$index" ] -then - [ "$pcm_3" ] && amixer -c "$index" cset name="PCM Playback Route" "$pcm_3" -fi - -avahi-publish -s \ -TestConnect _spotify-connect._tcp 4000 VERSION=1.0 CPath=/login/_zeroconf & - -[ "$scw_b" == "-" ] && scw_b="" -[ "$scw_b" ] && scw_b="-b $scw_b" -[ "$scw_m" ] && scw_m="-m $scw_m" -[ "$scw_p" ] && [ "$scw_u" ] && scw_p="-p $scw_p" && scw_u="-u $scw_u" - -cd "$ADDON_DIR" -./spotify-connect-web $scw_b \ - -c "$ADDON_HOME/credentials.json" \ - -k "$ADDON_HOME/spotify_appkey.key" \ - $scw_m \ - -n "$HOSTNAME" \ - -o "$scw_o" \ - $scw_p \ - $scw_u \ - --mixer_device_index "$index" diff --git a/packages/addons/service/spotify-connect-web/source/default.py b/packages/addons/service/spotify-connect-web/source/default.py deleted file mode 100644 index 3999a0eb31..0000000000 --- a/packages/addons/service/spotify-connect-web/source/default.py +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2016 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 . -################################################################################ - -import subprocess -import xbmc -import xbmcaddon - - -class Monitor(xbmc.Monitor): - - def __init__(self, *args, **kwargs): - xbmc.Monitor.__init__(self) - self.id = xbmcaddon.Addon().getAddonInfo('id') - - def onSettingsChanged(self): - subprocess.call(['systemctl', 'restart', self.id]) - - -if __name__ == "__main__": - Monitor().waitForAbort() diff --git a/packages/addons/service/spotify-connect-web/source/resources/language/English/strings.po b/packages/addons/service/spotify-connect-web/source/resources/language/English/strings.po deleted file mode 100644 index 386318d4e6..0000000000 --- a/packages/addons/service/spotify-connect-web/source/resources/language/English/strings.po +++ /dev/null @@ -1,116 +0,0 @@ -# Kodi Media Center language file -# Addon Name: spotify-connect-web -msgid "" -msgstr "" - -msgctxt "#30100" -msgid "Configuration" -msgstr "" - -msgctxt "#30101" -msgid "Spotify" -msgstr "" - -msgctxt "#30102" -msgid "Username (optional)" -msgstr "" - -msgctxt "#30103" -msgid "Password" -msgstr "" - -msgctxt "#30104" -msgid "Bit rate" -msgstr "" - -msgctxt "#30105" -msgid "-" -msgstr "" - -msgctxt "#30106" -msgid "90" -msgstr "" - -msgctxt "#30107" -msgid "160" -msgstr "" - -msgctxt "#30108" -msgid "320" -msgstr "" - -msgctxt "#30109" -msgid "ALSA" -msgstr "" - -msgctxt "#30110" -msgid "Configuration wizard" -msgstr "" - -msgctxt "#30111" -msgid "Playback device" -msgstr "" - -msgctxt "#30112" -msgid "Mixer" -msgstr "" - -msgctxt "#30113" -msgid "Initial volume" -msgstr "" - -msgctxt "#30114" -msgid "Playback route" -msgstr "" - -msgctxt "#30115" -msgid "auto detect" -msgstr "" - -msgctxt "#30116" -msgid "headphone jack" -msgstr "" - -msgctxt "#30117" -msgid "HDMI" -msgstr "" - -msgctxt "#30200" -msgid "Instructions" -msgstr "" - -msgctxt "#30201" -msgid "1. Copy your spofify_appkey.key the addon's home folder" -msgstr "" - -msgctxt "#30202" -msgid "2. Optionally enter your Spotify username and password" -msgstr "" - -msgctxt "#30203" -msgid "3. Configure ALSA with the wizard" -msgstr "" - -msgctxt "#30204" -msgid "4. Save the settings" -msgstr "" - -msgctxt "#30205" -msgid "5. Check the service with the web interface at port 4000" -msgstr "" - -msgctxt "#30206" -msgid "6. Play Spotify through the service, using a Spotify app as a remote" -msgstr "" - -msgctxt "#30207" -msgid "7. Enjoy!" -msgstr "" - -msgctxt "#30210" -msgid "No playback device" -msgstr "" - -msgctxt "#30211" -msgid "Could not find a playback device" -msgstr "" diff --git a/packages/addons/service/spotify-connect-web/source/resources/settings.xml b/packages/addons/service/spotify-connect-web/source/resources/settings.xml deleted file mode 100644 index 88496b4cb8..0000000000 --- a/packages/addons/service/spotify-connect-web/source/resources/settings.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/addons/service/spotify-connect-web/source/system.d/service.spotify-connect-web.service b/packages/addons/service/spotify-connect-web/source/system.d/service.spotify-connect-web.service deleted file mode 100644 index 91523d0a78..0000000000 --- a/packages/addons/service/spotify-connect-web/source/system.d/service.spotify-connect-web.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=spotify-connect-web -After=network-online.target -Requires=network-online.target - -[Service] -ExecStart=/bin/sh /storage/.kodi/addons/service.spotify-connect-web/bin/spotify-connect-web.start -Restart=on-failure - -[Install] -WantedBy=kodi.target diff --git a/packages/addons/service/spotify-connect-web/source/wizard.py b/packages/addons/service/spotify-connect-web/source/wizard.py deleted file mode 100644 index be4455dc60..0000000000 --- a/packages/addons/service/spotify-connect-web/source/wizard.py +++ /dev/null @@ -1,53 +0,0 @@ -################################################################################ -# This file is part of LibreELEC - https://libreelec.tv -# Copyright (C) 2016 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 . -################################################################################ - -import alsaaudio as alsa -import xbmcaddon -import xbmcgui - -if __name__ == "__main__": - - addon = xbmcaddon.Addon("service.spotify-connect-web") - dialog = xbmcgui.Dialog() - strings = addon.getLocalizedString - - while True: - pcms = alsa.pcms()[1:] - if len(pcms) == 0: - dialog.ok(strings(30210), strings(30211)) - break - pcmx = dialog.select(strings(30111), pcms) - if pcmx == -1: - break - pcm = pcms[pcmx] - pair = pcm.split(":CARD=") - device = pair[0] - card = pair[1].split(",")[0] - cardx = alsa.cards().index(card) - mixers = [mixer for mixer in alsa.mixers(cardindex=cardx, device=device) - if 'Playback Volume' in alsa.Mixer(control=mixer, cardindex=cardx).volumecap()] - if len(mixers) == 0: - mixer = "" - else: - mixerx = dialog.select(strings(30112), mixers) - if mixerx == -1: - continue - mixer = mixers[mixerx] - addon.setSetting("scw_m", mixer) - addon.setSetting("scw_o", pcm) - break