Autostart Librespot

  • Hey I just upgraded really easy from openelec to LibreElec 8.0.2 on Linux

    I did this to get Librespot (8.1.102). That add on works but it doesn't auto start


    I tried to play with autoexec.py

    import xbmc

    xbmc.executebuiltin("RunAddon(service.librespot)")


    But I guess this doesn't work because it's a service

    So how do I get it to auto start ?

  • Autostart?

    Use a Spotify application (on your phone or PC) to select [email protected] and to play tracks. Make sure that Kodi is not playing anything else, as this disables Librespot.

    Also, please ask questions, report bugs and request features in the thread dedicated to Librespot.

    @

  • I was indeed wrong... It does auto start

    But I can't conenct with spotify until I go

    librespot > configure > ok


    This after every reboot

    I posted it now in the librespot thread

    Edited once, last by Camella ().

  • What LibreELEC project are you running (Generic, RPi2, etc.)?

    What are your Librespot settings?

    What is reported in the log (journalctl -u service.librespot)?

    @

  • Generic (linux)
    I dropped the generic TAR file in my old openelec config with syslinux 6.0.3



    <settings>

    <setting id="ls_D" value="false" />

    <setting id="ls_O" value="ALSA" />

    <setting id="ls_b" value="-" />

    <setting id="ls_d" value="true" />

    <setting id="ls_o" value="" />

    <setting id="ls_p" value="" />

    <setting id="ls_u" value="" />

    <setting id="pcm_3" value="0" />

    </settings>


    Log I will dig up in a bit


    Would it maybe be better to start clean with lIbreElec ?

  • Try playing through Kodi rather than ALSA

    @

  • That does make a big difference.

    After a reboot my phone does see LibreSpot


    But now it's really slow. Pushing stop on the phone for example takes 6 seconds


    Going back to ALSA and it's responsive again

    But then not working at boot as before


    I'm using an old Asrock Ion 330 with a tiny Atom CPU

    Smooth for H264 and it never let me down.


    I forgot the password for openelec and the default isn't working

    So getting the log is complicated

  • The issue with ALSA is that service.librespot starts before your ALSA device(s) are ready.

    I will try to find out how to solve this.

    In the meantime, add sleep 5 at line 2 of /storage/.kodi/addons/service.librespot/bin/librespot.start


    password for root is libreelec

    @

  • Ok that password does indeed work so it changed with LibreElec


    This did work

    sleep 5
    activate_card() {

    if [ -e "/proc/asound/$1" ]; then


    Spotify on my phone does see LibreElec now quite fast

    But even though spotify does see librespot it still won't connect to it in the first minute


    Too bad for this minute

    But how it works after this minute is really awesome :)

    Edited 2 times, last by Camella ().

  • It's the same when playing a movie, librespot disappears from my phone

    After stopping the movie librespot comes back on the phone in seconds

    But then it takes a minute before it's possible to connect again


    I'm going to try a clean setup on another HD just to see if it's my build causing that

  • It's the same when playing a movie, librespot disappears from my phone

    After stopping the movie librespot comes back on the phone in seconds

    But then it takes a minute before it's possible to connect again


    I'm going to try a clean setup on another HD just to see if it's my build causing that

    Works as programmed: the librespot service is stopped during Kodi playback, as a courtesy to potential Spotify users (do not disturb). Service is restarted immediately if Kodi user stops playback, or five seconds after playback ends.

    @

  • But is it also as designed that between those actions there is a delay of 60 seconds where the service is up but there is no way to connect ?


    Edit

    I did a clean setup and it's a lot faster

    It now connects after about 5 seconds

    Edited once, last by Camella ().