Librespot Add-on

    • Official Post

    Team LibreELEC is happy to announce that Librespot is available as an addon from the LibreELEC Add-ons repository for all LibreELEC projects.

    Many thanks to shanemeagher for his initiative and his invaluable contribution.

    The Librespot addon behaves as a Spotify Connect device.

    At the moment, the Librespot addon streams to ALSA audio devices; streaming via http and/or Kodi is in the pipeline.

    Addon settings are available through the Kodi user interface:

    A wizard enables to select one of the available ALSA audio devices.

    Discovery is enabled by default, setting userid/password is therefore not necessary.

    Please report any issues here.

    Enjoy!

  • Great!
    just tested quickly the RPi2 version and it works perfectly. No need to use the app.key as far as I see. The username and password seems to be enough.

    One question, though: How is it with the audio priority? While Librespot plays music, nothing else outputs audio on LibreELEC. So lets say I start a LiveTV channel, it is kind of muted unless I stop spotify and stop the LiveTV broadcast as well and restart it afterwards. Is there something how this could be handled? Like: Play music and play the Audio from LiveTV at once, until I decide to stop spotify playback?

    • Official Post


    Great!
    just tested quickly the RPi2 version and it works perfectly. No need to use the app.key as far as I see. The username and password seems to be enough.

    One question, though: How is it with the audio priority? While Librespot plays music, nothing else outputs audio on LibreELEC. So lets say I start a LiveTV channel, it is kind of muted unless I stop spotify and stop the LiveTV broadcast as well and restart it afterwards. Is there something how this could be handled? Like: Play music and play the Audio from LiveTV at once, until I decide to stop spotify playback?

    Username and password should not be required anymore. Setting the (default) playback device is also superfluous.

    Address your quetion to the librespot project (GitHub - plietar/librespot: Open Source Spotify client library)

  • Hi awiouy

    I tried to compile it for aarch64 to provide it here for the Odroid C2 and wetek users, but unfortunately it is not (not yet compatible?) building successfully due to missing dependencies or so. So the LibreELEC toolchian is not sufficient currently. Do you have any Idea when this will be possible?

    • Official Post

    Hi awiouy

    I tried to compile it for aarch64 to provide it here for the Odroid C2 and wetek users, but unfortunately it is not (not yet compatible?) building successfully due to missing dependencies or so. So the LibreELEC toolchian is not sufficient currently. Do you have any Idea when this will be possible?

    Hi infinity85

    I have attempted to build librespot for aarch64, by adapting the librespot Docker build system to add aarch64.

    Unfortunately, building for aarch64 fails.

    I will not pursue this lead, as I would rather add Rust to LibreELEC.

    Feel free to pick it up from there. Keep me posted ;)

  • Thanks awiouy

    Unfortunately I'm totally unexperienced with building. I just followed the building guides on LibreELEC wiki and had a lot of help from GDPR-1 with my newbieproblems at the beginning. My current state is that I can build addons with package.mk and that's quite it :/.

    What do you mean with "rather add Rust to LibreELEC"? I know that Rust is a programming language like c++ etc. But what is the aim with adding it?

    • Official Post

    What do you mean with "rather add Rust to LibreELEC"? I know that Rust is a programming language like c++ etc. But what is the aim with adding it?

    At the moment, I build Librespot using the Docker build system provided by the Librespot project. My idea is to add Rust to the LibreELEC build system, in order to build (Rust and) Librespot from source, as all other packages ar built in LibreELEC.

  • Hi,

    I have installed it on the intel NUC and so far I have two issues

    1. It doesn't start after reboot. I have to reinstall it or disable/enable it every time.

    2. Only the analog sound output is working. No sound thru HDMI.

  • Hi,

    After restarting system I have disable/enable librespot add-on and have tried to play a song

    -- Logs begin at Sun 2017-05-28 21:13:51 CEST, end at Sun 2017-05-28 21:16:37 CEST. --

    May 28 21:13:52 LibreELEC systemd[1]: Started librespot.

    May 28 21:13:51 LibreELEC sh[305]: Unable to activate an audio interface on Generic.x86_64

    May 28 21:14:59 LibreELEC systemd[1]: Started librespot.

    May 28 21:14:59 LibreELEC sh[829]: INFO:librespot: librespot 82ebdbd (2017-05-17). Built on 2017-05-18.

    May 28 21:14:59 LibreELEC sh[829]: INFO:librespot::session: Connecting to AP "sto3-accesspoint-a23.ap.spotify.com:4070"

    May 28 21:15:00 LibreELEC sh[829]: INFO:librespot::session: Authenticated as "11142056011" !

    May 28 21:15:00 LibreELEC sh[829]: INFO:librespot::session: Country: "SK"

    May 28 21:15:00 LibreELEC sh[829]: INFO:librespot::audio_backend::alsa: Using alsa sink

    May 28 21:15:19 LibreELEC sh[829]: INFO:librespot::player: Loading track "Keep It from You"

    May 28 21:15:20 LibreELEC sh[829]: INFO:librespot::player: Track "Keep It from You" loaded

    May 28 21:15:20 LibreELEC sh[829]: thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/opt

    ion.rs:323

    May 28 21:15:20 LibreELEC sh[829]: note: Run with `RUST_BACKTRACE=1` for a backtrace.

  • 1. Please provide a log (at the console type: journalctl -u service.librespot).

    2. On Generic/x86_64, librespot is known not being able to share a device used by Kodi if option "keep audio sink alive" is set in Kodi

    I disabled "keep audio device alive" and now it works on my nuc. Great addon! I've been looking forward to this moment since I first installed libreelec :)

    • Official Post

    Hi,

    Is there any potential that add-on will starts correctly after system reboot? Or any possibility to restart it from Yatse or Kore?

    I am not sure to understand your question. The service should start at boot, and remain started. If this is not what you experience, please provide further information, such as on what system you are running librespot and a log (journalctl -u service.librespot from ssh).