Announcement

Collapse
No announcement yet.

[Announce] Spotty 4.0 - integrate local library with your Spotify collection (LMS 8+)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

    > If you ever consider changing backends,
    > https://github.com/Spotifyd/spotifyd seems to have utterly rock-solid
    > performance. I was feeding this into an icecast stream and was able to
    > playback for >24hrs continuously without a single hitch in that service.


    Spotifyd actually uses the same backend library as Spotty: librespot.
    The problem is not the backend in our case, but the integration with
    LMS. Both LMS and the Spotify apps want to be in control of the
    playback. This causes difficult situations which Spotty still doesn't
    handle that well. If we decided to drop LMS control, then librespot
    would just do the job. You'd have delays in playback, no way to sync
    volume, change track from LMS, metadata in the LMS environment etc., but
    fewer issues for sure.
    Michael

    "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
    (LMS: Settings/Information)

    Comment


      [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

      > Spotty Helper Application
      > C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
      > (v1.3.0)


      Ok, you're on Windows. Please make sure your firewall or antivirus or
      security product don't block network access for the above executable.
      Michael

      "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
      (LMS: Settings/Information)

      Comment


        Originally posted by mherger View Post
        > Spotty Helper Application
        > C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
        > (v1.3.0)


        Ok, you're on Windows. Please make sure your firewall or antivirus or
        security product don't block network access for the above executable.
        Definitely not blocked (can't see how this would have changed really) and nope, still not authorising by either method.

        Comment


          [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

          > Definitely not blocked (can't see how this would have changed really)

          But something did change. Spotty did not. Any system updates you installed?

          If you enable logging for Spotty, you could see the command spotty.exe
          is using to try to sign in. You could use that in a command window to
          try it out manually. Basically:

          spotty.exe -n auth -a -c . -u <username> -p <password>

          You should then find a credentials.json in your folder.
          Michael

          "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
          (LMS: Settings/Information)

          Comment


            So I've set logging to debug, which seems to give a bit more information, but still doesn't really show why it's failing (redacted MACs, Usernames, hostnames etc)

            Trying a manual authentication with the user/pass is logging this

            [22-10-28 19:06:15.2635] Plugins::Spotty::Connect:aemonManager::initHelpers (92) Checking Spotty Connect helper daemons...
            [22-10-28 19:06:15.2637] Plugins::Spotty::Connect:aemonManager::initHelpers (126) This is a standalone player with Spotify Connect disabled: ****

            [22-10-28 19:06:17.8324] Plugins::Spotty::Helper::_findBin (192) Trying helper application: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
            [22-10-28 19:06:17.8874] Plugins::Spotty::Helper::helperCheck (118) Found helper capabilities table: do {
            my $a = {
            autoplay => bless(do{\(my $o = 1)}, "JSON::XS::Boolean"),
            debug => bless(do{\(my $o = 0)}, "JSON::XS::Boolean"),
            "lms-auth" => 'fix',
            "ogg-direct" => 'fix',
            podcasts => 'fix',
            "save-token" => 'fix',
            version => "1.3.0",
            "volume-normalisation" => 'fix',
            "zeroconf-port" => 'fix',
            };
            $a->{"lms-auth"} = \${$a->{autoplay}};
            $a->{"ogg-direct"} = \${$a->{autoplay}};
            $a->{podcasts} = \${$a->{autoplay}};
            $a->{"save-token"} = \${$a->{autoplay}};
            $a->{"volume-normalisation"} = \${$a->{autoplay}};
            $a->{"zeroconf-port"} = \${$a->{autoplay}};
            $a;
            }
            [22-10-28 19:06:17.8875] Plugins::Spotty::Helper::_findBin (195) Found helper application: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
            [22-10-28 19:06:17.8879] Plugins::Spotty::Settings::Auth::handler (69) Trying to authenticate using: "C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spott y\Bin\MSWIN3~1\spotty.exe" -c "C:\ProgramData\Squeezebox\Cache\spotty\__AUTHENTI CATE__" -n "Spotify Authorization (****)" -u "******" -p "********" -a --disable-discovery --ap-port 12321 --verbose
            [22-10-28 19:06:18.0100] Plugins::Spotty::Settings::Auth::handler (74) Got response:
            [22-10-28 19:06:18.0101] Plugins::Spotty::Settings::Auth::handler (83) Authorization failed:
            [22-10-28 19:06:18.0333] Plugins::Spotty::Helper::_findBin (192) Trying helper application: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
            [22-10-28 19:06:18.0869] Plugins::Spotty::Helper::_findBin (195) Found helper application: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe

            So the command it's trying to use is slightly different from yours - I tried that (with the .) and it seemed to just end straight away, and without it seemed to be actually running but didn't display or log anything.

            Periodically it seems to be putting the below through the logs
            [22-10-28 19:07:15.2779] Plugins::Spotty::Connect:aemonManager::initHelpers (92) Checking Spotty Connect helper daemons...
            [22-10-28 19:07:15.2781] Plugins::Spotty::Connect:aemonManager::initHelpers (126) This is a standalone player with Spotify Connect disabled: ***

            If I try the player method whilst watching the log it seems to be doing this
            [22-10-28 19:09:19.2032] Plugins::Spotty::Helper::_findBin (192) Trying helper application: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
            [22-10-28 19:09:19.2601] Plugins::Spotty::Helper::helperCheck (118) Found helper capabilities table: do {
            my $a = {
            autoplay => bless(do{\(my $o = 1)}, "JSON::XS::Boolean"),
            debug => bless(do{\(my $o = 0)}, "JSON::XS::Boolean"),
            "lms-auth" => 'fix',
            "ogg-direct" => 'fix',
            podcasts => 'fix',
            "save-token" => 'fix',
            version => "1.3.0",
            "volume-normalisation" => 'fix',
            "zeroconf-port" => 'fix',
            };
            $a->{"lms-auth"} = \${$a->{autoplay}};
            $a->{"ogg-direct"} = \${$a->{autoplay}};
            $a->{podcasts} = \${$a->{autoplay}};
            $a->{"save-token"} = \${$a->{autoplay}};
            $a->{"volume-normalisation"} = \${$a->{autoplay}};
            $a->{"zeroconf-port"} = \${$a->{autoplay}};
            $a;
            }
            [22-10-28 19:09:19.2602] Plugins::Spotty::Helper::_findBin (195) Found helper application: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe
            [22-10-28 19:09:19.2605] Plugins::Spotty::Settings::Auth::startHelper (163) Starting Spotty Connect deamon:
            C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe -c C:\ProgramData\Squeezebox\Cache\spotty\__AUTHENTIC ATE__ -n Spotify Authorization (**) -a --ap-port=12321

            The spotty authentication thing is picking up the spotty player on the machine so that side of things is working but it then just doesn't log anything more and comes back to repeating the previous two lines every minute or so.

            Running your spotty command from the command prompt doesn't seem to be logging anything at all, unless these are going somewhere else.

            I can't see a credentials.json file anywhere (and nor can searching) so not sure where that should be popping up.

            It's also difficult to see when this actually started (to see what might have broken it before) but the first error issues are
            [22-10-11 01:30:47.0353] Plugins::Spotty::API::Token::_killTokenHelper (182) Timed out waiting for a token

            yet this is some time after the previous server start which was
            [22-10-10 16:26:22.2791] main::init (377) Starting Logitech Media Server (v8.3.0, 1664261103, Tue Sep 27 08:46:52 WEDT 2022) perl 5.014001 - MSWin32-x86-multi-thread
            (and before MS patches released on 11th...)

            The same line then pops back in 48 hours later
            [22-10-13 01:33:07.5291] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            (this would then presumably be a background task as I wouldn't be listening to spotty at 1.30 in the morning)

            then a few days later
            [22-10-19 20:22:25.5838] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            and a few of these again when nothing's actually trying to use the plugin
            [22-10-21 22:23:17.5429] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-21 23:23:18.5306] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 00:23:18.5347] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 01:23:18.5396] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 02:23:18.5223] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 03:23:18.5371] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 04:23:18.5233] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 05:23:18.5181] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            [22-10-22 06:23:18.5183] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
            which then appears to be repeating itself in the log every hour until last night when I tried to use it again

            Not sure that this correlates to anything on the machine which has changed which could have broken it, not really sure what is stopping it from doing anything really. I've also tried with both KTS and Windows security turned off and still neither authentication method is doing anything different.

            Comment


              [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

              > So the command it's trying to use is slightly different from yours - I
              > tried that (with the .) and it seemed to just end straight away, and
              > without it seemed to be actually running but didn't display or log
              > anything.


              Are you sure you got the password right? Did you recently change it? I
              would get a zero response if I gave the wrong password.
              Michael

              "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
              (LMS: Settings/Information)

              Comment


                Originally posted by mherger View Post
                > So the command it's trying to use is slightly different from yours - I
                > tried that (with the .) and it seemed to just end straight away, and
                > without it seemed to be actually running but didn't display or log
                > anything.


                Are you sure you got the password right? Did you recently change it? I
                would get a zero response if I gave the wrong password.
                Nope, the password was definitely right.

                In any case, I've rolled back the spotty prefs file and the credentials file which must have removed themselves when I tried to see if signing out of the account and back in again would fix it.

                It is now presenting the following if I try and login to spotty from the home screen, which I think was the message I was getting when it stopped working:
                Failed to get access token
                Please check Settings/Advanced/Spotty Spotify for Squeezebox in the web interface
                (it isn't telling me though what token or what settings to actually check though)


                This is now periodically coming up in the logs (this is from a time when the machine was idle)
                22-10-29 12:06:53.0131] Plugins::Spotty::API::Token::get (207) Didn't find cached token. Need to refresh.
                [22-10-29 12:06:53.0144] Plugins::Spotty::API::Token::_logCommand (136) Trying to get access token: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe -n Squeezebox -c C:\ProgramData\Squeezebox\Cache\spotty\77bd7659 -i abcdef1234567890 --disable-discovery --scope user-read-private,user-follow-modify,user-follow-read,user-library-read,user-library-modify,user-top-read,user-read-recently-played,user-read-playback-state,user-modify-playback-state,playlist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private --save-token C:\Users\***\AppData\Local\Temp\hO6ZhGhZI3
                [22-10-29 12:06:53.5396] Plugins::Spotty::API::Token::_gotTokenInfo (149) Got response: {"error":"Failed to create session or connect to servers."}
                [22-10-29 12:06:53.5397] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
                [22-10-29 12:06:53.5402] Plugins::Spotty::API::Token::get (203) Found cached token: -1
                [22-10-29 12:06:53.5406] Plugins::Spotty::API::Token::get (203) Found cached token: -1

                and also

                [22-10-29 12:22:53.4596] Plugins::Spotty::API::Token::get (207) Didn't find cached token. Need to refresh.
                [22-10-29 12:22:53.4609] Plugins::Spotty::API::Token::_logCommand (136) Trying to get access token: C:\PROGRA~3\SQUEEZ~1\Cache\INSTAL~1\Plugins\Spotty \Bin\MSWIN3~1\spotty.exe -n Squeezebox -c C:\ProgramData\Squeezebox\Cache\spotty\77bd7659 -i abcdef1234567890 --disable-discovery --scope user-read-private,user-follow-modify,user-follow-read,user-library-read,user-library-modify,user-top-read,user-read-recently-played,user-read-playback-state,user-modify-playback-state,playlist-read-private,playlist-read-collaborative,playlist-modify-public,playlist-modify-private --save-token C:\Users\***\AppData\Local\Temp\tnd144cxgq
                [22-10-29 12:22:53.9933] Plugins::Spotty::API::Token::_gotTokenInfo (149) Got response: {"error":"Failed to create session or connect to servers."}
                [22-10-29 12:22:53.9934] Plugins::Spotty::API::Token::_gotTokenInfo (168) Failed to create session or connect to servers.
                [22-10-29 12:22:53.9936] Plugins::Spotty::OPML::__ANON__ (198) Failed to get featured playlists and/or token - do not continue

                Trying that command just exits without entering anything at all into command prompt

                I've tried with no Spotty developer key and even creating a new one but every time it's still failing at the same point.

                Comment


                  [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

                  > In any case, I've rolled back the spotty prefs file and the credentials
                  > file which must have removed themselves when I tried to see if signing
                  > out of the account and back in again would fix it.


                  I think you can stop investigating the plugin or LMS or whatever. As
                  long as you can't get the spotty binary to give you an "authorized"
                  response when run in a command window, no change you do in LMS would
                  help in any way. As this simple check is failing, but the helper itself
                  has not changed, I only see two possible reasons for the failure:

                  - credentials are wrong: reset your password to something really simple
                  in Spotify, try again using spotty.

                  - something is preventing the helper spotty.exe from accessing the
                  internet: double check your firewall(s), antivirus and security
                  products, whether any of these block spotty.exe.

                  Michael

                  "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                  (LMS: Settings/Information)

                  Comment


                    Spotty is just a great plug in and works superbly well.
                    What I cannot get to work so well is Spotify Connect - I get stuck on particular tracks (clicking next just plays the same track again); the track playing is different to the one showing as playing; and tracks that never end.
                    Is there a solution that has worked for these problems? The reality, I suppose, is that I don't really need to use Spotify Connect and could just use Spotty, but we always want more!

                    Comment


                      [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

                      > What I cannot get to work so well is Spotify Connect - I get stuck on
                      > particular tracks (clicking next just plays the same track again); the
                      > track playing is different to the one showing as playing; and tracks
                      > that never end.
                      > Is there a solution that has worked for these problems? The reality, I
                      > suppose, is that I don't really need to use Spotify Connect and could
                      > just use Spotty, but we always want more!


                      Unfortunately I'm aware of the fact that Connect is rather, ahm...
                      sensitive. I always hoped I'd find the key to stability at some point.
                      But I'm not there yet.
                      Michael

                      "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                      (LMS: Settings/Information)

                      Comment


                        Hello, is it possible to use the offline music function from Spotify? Every time I am using Orange Squeeze and want to download something it seems that the download works. But I can't find the titles on my mobile. Would this be possible in general?

                        Comment


                          [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

                          > Hello, is it possible to use the offline music function from Spotify?

                          With Spotty? No.
                          Michael

                          "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                          (LMS: Settings/Information)

                          Comment


                            Originally posted by mherger View Post
                            > What I cannot get to work so well is Spotify Connect - I get stuck on
                            > particular tracks (clicking next just plays the same track again); the
                            > track playing is different to the one showing as playing; and tracks
                            > that never end.
                            > Is there a solution that has worked for these problems? The reality, I
                            > suppose, is that I don't really need to use Spotify Connect and could
                            > just use Spotty, but we always want more!


                            Unfortunately I'm aware of the fact that Connect is rather, ahm...
                            sensitive. I always hoped I'd find the key to stability at some point.
                            But I'm not there yet.
                            Spotty works well and I've been using it for a while. However, the connect function does not work at all. I have ticked all the boxes. I use Spotty on a Synology. What could be the problem? Do I need a helper application?
                            Last edited by MisterB; 2022-11-26, 14:25.

                            Comment


                              [Announce] Spotty 4.0 - integrate locallibrary with your Spotify collection (LMS 8+)

                              > Spotty works well and I've been using it for a while. However, the
                              > connect function does not work at all. I have ticked all the boxes. I
                              > use Spotty on a Synology. What could be the problem?


                              Are you still using LMS with DSM6? Or in Docker? Anything in server.log?
                              Michael

                              "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                              (LMS: Settings/Information)

                              Comment


                                Wow. Thank you for your prompt reply. I've been trying all afternoon to get Spotty Connect working with all sorts of settings. Vain. I had already given up and saw that it works on my son's cell phone. It was now clear that it had to be the mobile app on the smartphone. I logged out of the app and logged back in again. Now everything works for me. Whatever the reason...

                                Thanks for the great support. That is really great!!!!!!

                                Comment

                                Working...
                                X