Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Mar 2008
    Location
    Netherlands
    Posts
    752

    Combine spotify family plugin with new Spotify & SPH plugins

    Is it possible to combine the functions of both these plugins? I have family account for spotify but can only use it with the triode family app. Which does not let me play any 'Moods' playlists.

    That's a pity so i have to choose between saying goodby to my beloved squeezebox family or keeping them but being able to play standard songs or albums only.
    Setup: 1 Touch, 4 Booms and 1 Radio.
    Server: LMS 7.8 (DebianVM in Proxmox), Tonido for webbased playback

  2. #2
    Junior Member
    Join Date
    Jul 2009
    Location
    Germany, Heidelberg
    Posts
    17

    Can this be achieved somehow?

    I would also be very interested in such an option - how could this be achieved?
    4 Radios, 2 Boom, 2 Touch working + 1 Touch broken trying to fix, 1 Classic, 1 Duet Controller, 2 Duet Receiver, 1 Musical Fidelity V-DAC on Duet Receiver.

    LMS running on WHS 2011.

  3. #3
    Member
    Join Date
    Apr 2009
    Location
    Sheffield, UK
    Posts
    53
    Quote Originally Posted by raven22 View Post
    Is it possible to combine the functions of both these plugins? I have family account for spotify but can only use it with the triode family app. Which does not let me play any 'Moods' playlists.

    That's a pity so i have to choose between saying goodby to my beloved squeezebox family or keeping them but being able to play standard songs or albums only.
    Why don't you save the mood list to a playlist? Give it the name of whatever mood you've saved.

    If you save it using the official Spotify app in LMS, it'll appear as one of your LMS playlists.

    If you save it in the Spotify web or mobile app, it'll appear as a Spotify playlist which you can then access through the Spotify Family plugin.

    Chris
    4 Booms, 2 Classics, 3 Radios, 1 Raspberry Pi.

  4. #4
    Senior Member
    Join Date
    Feb 2011
    Location
    Cheshire, UK
    Posts
    2,754
    I do it by having multiple Pi's with piCorePlayer installed in both player and server mode. I set the player to use 127.0.0.1 as it's server and then put the Protocol Handler on with a specific family account. As far as local library is concerned all Pi's point at the same NAS for library.
    A kid can accidentally change to the "wrong" server but it is now rare.
    Pi3 with piCoreplayer music on QNAP TS419p via NFS iThingys/iPeng/Tablets/Jogglers
    Living Room - Joggler & SB3 -> Onkyo TS606 - > Celestion Ditton F20s
    Office - Pi -> Sony TA FE320 -> Celestion F10s / Pi & SB3 -> Onkyo CRN 755 -> Wharfedale Modus Cubes
    Dining Room -> SB Boom Kitchen -> UE Radio (upgraded to SB Radio)
    Bedroom (Bedside) - SB Touch -> Topping TP21 -> AKG Headphones

  5. #5
    Junior Member
    Join Date
    Jul 2009
    Location
    Germany, Heidelberg
    Posts
    17

    Taking Spotify users stored on mysqueezebox.com for SPH streaming...

    I have tried to better understand how spotify playback is implemented when running through compatible players (e.g. Radio, ...), and how the SPH takes care of the un-compatible players (e.g. Transporter, Boom, Duet, ...).

    First of all, if you are lucky and only have Spotify compatbible players (meaning: spotify playback is enabled by the firmware of thes players), you can setup your spotify family accounts:

    Name:  1.png
Views: 165
Size:  91.4 KB

    ...and attach them to each individual player on mysqueezebox.com - which is already great:

    Name:  2.png
Views: 166
Size:  92.2 KB

    Now, each (compatible) player is running Spotify with its respective account that has been maintained - you have full Spotify Family support.

    For the un-compatible players, SPH checks before each playback and determines what to do. In case of a compabible player canDirectStream (111), it lets the standard Spotify plugin take over:

    (taken from server.log)
    [17-04-17 14:12:36.7942] Plugins::SpotifyProtocolHandler::ProtocolHandler:: canDirectStream (111) Playing via Slim::Plugin::SpotifyLogi::ProtocolHandler: spotify://track:7u2KwlIqVTQQVPudaTd41e
    [17-04-17 14:12:36.7950] Slim::Plugin::SpotifyLogi::ProtocolHandler:nStream (185) 00:04:20:27:91:68 Sending playback information (username johanndornbach_sap, bitrate pref 320)

    If the player cannot play Spotify streams from within its firmware, it takes over:
    (taken from server.log)
    [17-04-17 14:13:11.0152] Plugins::SpotifyProtocolHandler::ProtocolHandler:: canDirectStream (120) Playing via spotifyd: spotify://track:3Cc3ssgsvdSaEbFT6KHBAv

    and logs in with the spotify user maintained in the SPH Plugin settings:
    (taken from spotifyd.log)
    [18:33:11.192] main:702 relogging in as user: X1.Y2

    I have tried to read and understand the Perl scripts on both

    Squeezebox\server\Slim\Plugin\SpotifyLogi

    and

    InstalledPlugins\Plugins\SpotifyProtocolHandler.

    Unfortunately I am a total newbie in Perl and Squeezebox coding/scripting.

    From what I believe I have understood, I am thinking about the following concept:

    1. Extend the SPH settings

    "C:\ProgramData\Squeezebox\Cache\InstalledPlugins\ Plugins\SpotifyProtocolHandler\HTML\EN\plugins\Spo tifyProtocolHandler\settings\basic.html"

    to store let's say 6 Spotify accounts + PWs

    2. When the SPH takes over Spotify streaming, get the Spotify user name attached to the target player from the mysqueezebox.com settings. Apparently the original Spotify already can do this in

    package Slim::Plugin::SpotifyLogi::ProtocolHandler;

    the sub "onStream" seems to have all the information in "$auth->{username}", where "my $auth = $client->pluginData('auth');" and "$client" is sent by the external caller while calling the sub "onStream".

    Can this or something similar be used to get the user from mysqueezebox.com from within the SPH?

    3. Then login with the user we received from from 2. and take the login PW from 1. (of course only the PW with matching users on both ends), and start streaming over spotifyd.

    What I have not yet understood: this would be very nice if the same spotify helper

    "C:\ProgramData\Squeezebox\Cache\InstalledPlugins\ Plugins\SpotifyProtocolHandler\Bin\MSWin32-x86-multi-thread\spotifyd.exe"

    could be called / run multiple times with different users at the same time - because I want to listen to multiple Spotify streams (on un-compatible players like Duet or Boom) at the same time...

    Can anyone tell me if this is a valid approach? If yes, I guess it will take me forever to produce a correct and working set of Perl coding for 2. and 3. Do you have any ideas how to best start?

    Regards,
    4 Radios, 2 Boom, 2 Touch working + 1 Touch broken trying to fix, 1 Classic, 1 Duet Controller, 2 Duet Receiver, 1 Musical Fidelity V-DAC on Duet Receiver.

    LMS running on WHS 2011.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •