[TH] Spotify [Deleted]

That's pretty cool.

A few questions:

Can you use this without allowing the Spotify forum login/signup stuff?

Does it come with any widgets? For example, "What are people listening to now" that show X users and what they're listening to in a widget. That'd be more useful having it all in once place rather than randomly on some people's accounts.

Is the Spotify polling likely to be an issue? Is anything needed to do that from the forum-side?
 
That's pretty cool.

A few questions:

Can you use this without allowing the Spotify forum login/signup stuff?
Yes, the account needs to be synced but can do so from User account settings, do not need to login directly but it does the same thing essentially, as we need to sync Spotify account one way or another just to pull that history.
Does it come with any widgets? For example, "What are people listening to now" that show X users and what they're listening to in a widget. That'd be more useful having it all in once place rather than randomly on some people's accounts.
Yes, it comes with what people are listening to AND top songs. I need to confirm we have documentation on setting those up from @Dalton Prock

But yeah the really cool part is you can see your forum's favorite songs at a glance. Neat little social tool.

Is the Spotify polling likely to be an issue? Is anything needed to do that from the forum-side?
We have a setting to tweak how often it gets pulled. Tagging @Jake B. on this, and also something we should add to documentation.

Will make some refinements for sure, but yeah any questions can get them answered.
 
I just installed this and created an app could you see if I might have set my account up wrong or is this possibly a firewall issue on my server? I wouldn't think it's a firewall issue since I am using https

Screen Shot 04-03-18 at 04.20 PM.webp
Oops! We ran into some problems.
GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to api.spotify.com port 443: Timed out in src\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php at line 49
  1. GuzzleHttp\Exception\RequestException::wrapException() insrc\vendor\guzzlehttp\guzzle\src\RequestFsm.php at line 103
  2. GuzzleHttp\RequestFsm->__invoke() in src\vendor\guzzlehttp\guzzle\src\RequestFsm.php at line 132
  3. GuzzleHttp\RequestFsm->GuzzleHttp\{closure}() in src\vendor\react\promise\src\FulfilledPromise.php at line 25
  4. React\Promise\FulfilledPromise->then() insrc\vendor\guzzlehttp\ringphp\src\Future\CompletedFutureValue.php at line 55
  5. GuzzleHttp\Ring\Future\CompletedFutureValue->then() insrc\vendor\guzzlehttp\guzzle\src\Message\FutureResponse.php at line 43
  6. GuzzleHttp\Message\FutureResponse::proxy() in src\vendor\guzzlehttp\guzzle\src\RequestFsm.php at line 134
  7. GuzzleHttp\RequestFsm->__invoke() in src\vendor\guzzlehttp\guzzle\src\Client.php at line 165
  8. GuzzleHttp\Client->send() in src\addons\ThemeHouse\Spotify\Util\Spotify\AbstractSpotify.php at line 120
  9. ThemeHouse\Spotify\Util\Spotify\AbstractSpotify->request() insrc\addons\ThemeHouse\Spotify\Util\Spotify\Player.php at line 9
  10. ThemeHouse\Spotify\Util\Spotify\Player->getCurrentPlayback() insrc\addons\ThemeHouse\Spotify\Service\Player\UpdatePlayback.php at line 36
  11. ThemeHouse\Spotify\Service\Player\UpdatePlayback->updateCurrentPlayback() insrc\addons\ThemeHouse\Spotify\Pub\Controller\Spotify.php at line 41
  12. ThemeHouse\Spotify\Pub\Controller\Spotify->actionUpdateCurrentPlayback() insrc\XF\Mvc\Dispatcher.php at line 249
  13. XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line 88
  14. XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line 41
  15. XF\Mvc\Dispatcher->run() in src\XF\App.php at line 1891
  16. XF\App->run() in src\XF.php at line 328
  17. XF::runApp() in index.php at line 13
 
I just installed this and created an app could you see if I might have set my account up wrong or is this possibly a firewall issue on my server? I wouldn't think it's a firewall issue since I am using https

View attachment 172621
Oops! We ran into some problems.
GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to api.spotify.com port 443: Timed out in src\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php at line 49
  1. GuzzleHttp\Exception\RequestException::wrapException() insrc\vendor\guzzlehttp\guzzle\src\RequestFsm.php at line 103
  2. GuzzleHttp\RequestFsm->__invoke() in src\vendor\guzzlehttp\guzzle\src\RequestFsm.php at line 132
  3. GuzzleHttp\RequestFsm->GuzzleHttp\{closure}() in src\vendor\react\promise\src\FulfilledPromise.php at line 25
  4. React\Promise\FulfilledPromise->then() insrc\vendor\guzzlehttp\ringphp\src\Future\CompletedFutureValue.php at line 55
  5. GuzzleHttp\Ring\Future\CompletedFutureValue->then() insrc\vendor\guzzlehttp\guzzle\src\Message\FutureResponse.php at line 43
  6. GuzzleHttp\Message\FutureResponse::proxy() in src\vendor\guzzlehttp\guzzle\src\RequestFsm.php at line 134
  7. GuzzleHttp\RequestFsm->__invoke() in src\vendor\guzzlehttp\guzzle\src\Client.php at line 165
  8. GuzzleHttp\Client->send() in src\addons\ThemeHouse\Spotify\Util\Spotify\AbstractSpotify.php at line 120
  9. ThemeHouse\Spotify\Util\Spotify\AbstractSpotify->request() insrc\addons\ThemeHouse\Spotify\Util\Spotify\Player.php at line 9
  10. ThemeHouse\Spotify\Util\Spotify\Player->getCurrentPlayback() insrc\addons\ThemeHouse\Spotify\Service\Player\UpdatePlayback.php at line 36
  11. ThemeHouse\Spotify\Service\Player\UpdatePlayback->updateCurrentPlayback() insrc\addons\ThemeHouse\Spotify\Pub\Controller\Spotify.php at line 41
  12. ThemeHouse\Spotify\Pub\Controller\Spotify->actionUpdateCurrentPlayback() insrc\XF\Mvc\Dispatcher.php at line 249
  13. XF\Mvc\Dispatcher->dispatchClass() in src\XF\Mvc\Dispatcher.php at line 88
  14. XF\Mvc\Dispatcher->dispatchLoop() in src\XF\Mvc\Dispatcher.php at line 41
  15. XF\Mvc\Dispatcher->run() in src\XF\App.php at line 1891
  16. XF\App->run() in src\XF.php at line 328
  17. XF::runApp() in index.php at line 13

That error is from your server timing out while attempting to connect to Spotify's API -- you'll probably want to contact your host to resolve it, we'll look into suppressing the error in the next update though :)
 
  • View what people are listening to by hovering over their name throughout the forum
  • Easily listen to the music that the user is listening too by clicking on the play button on the Spotify overlay
  • Easily view the song title and artist in the Spotify overlay
Can you add a screenshot for what this feature looks like? The photos on the product page itself only show the Spotify button itself on postbit and connected provider panels.
 
How much of a delay would that connection add to a page load (if it worked)? Or is it asynchronous?

It's all done asynchronously :)

I am my host! :p Running Windows 2016 Server... I see possible work around is to add 194.68.30.86 api.spotify.com to hostfile

This link found a few fixes https://github.com/vdesabou/alfred-spotify-mini-player/issues/106

When you attempt to ping api.spotify.com does it work? Odd that a DNS lookup wouldn't work

Can you add a screenshot for what this feature looks like? The photos on the product page itself only show the Spotify button itself on postbit and connected provider panels.

Tagging @nikkiradloff to get some better screenshots and have @Dalton Prock update the resource, but here are a couple screenshots:


Screen Shot 2018-04-03 at 3.46.48 PM.webp

Screen Shot 2018-04-03 at 3.47.55 PM.webp

Screen Shot 2018-04-03 at 3.49.03 PM.webp

Progress bar will live update as the user switches between songs/pauses (defaults to actually checking the API every 10 seconds -- everything else in between is handled by the browser increasing the progress). If the user you're viewing stops playing within a few seconds it'll update to this:

Screen Shot 2018-04-03 at 3.50.13 PM.webp


And clicking the 'play' button will open the song in your browser (may update this to automatically play the track for yourself via the API as well :) )
 
Can you add a screenshot for what this feature looks like? The photos on the product page itself only show the Spotify button itself on postbit and connected provider panels.
Funny enough I just noticed we didn't post a screenshot of this a few minutes before you posted this, so we're already on it. Will post that up shortly.

ETA Ninja'd
 
Widgets are coming in the next update, but we'll add them as well then :)

Ah ok!

Personally I think having big labels all over random user postbits is a bit ugly but it'd be really cool to have the widgets with the top songs played by users on our site.
 
@Jake B. When you attempt to ping api.spotify.com does it work? Odd that a DNS lookup wouldn't work


Unfortunately I cannot connect! I added 194.68.30.86 api.spotify.com to my hostfile didn't fix even tried rebooted my server same issue
Screen Shot 04-03-18 at 04.52 PM.webp
 
Last edited:
Can you add a screenshot for what this feature looks like? The photos on the product page itself only show the Spotify button itself on postbit and connected provider panels.
Screenshots have been updated, thank you for reporting this :)
 
I still cannot figure out why I cannot connect my server to spotify API! I tried logging into Spotify Developer site from my server and the login keeps refreshing as if my server was blocked from their website... I tried disabling my firewall as well an still cannot log into their Developer site. Am thinking they need to white list my server ip or could be the Data center where my servers located will ask them to look into it as well..

If anyone knows how to fix this issue I'd surely appreciate any help!

I am using Windows 2016 server.
 
Just an update the Data Center where my Server is hosted said they cannot ping Spotify from the Data Center at all... They tried it from an outside IP cannot ping 194.68.30.86 api.spotify.com but I can ping it from home go figure!
 
They may have ICMP disabled, so a ping probably isn't going to be helpful. What if you do curl https://api.spotify.com/v1/albums. You should get an error saying No token provided, but it'll at least show there is a connection being made
 
They may have ICMP disabled, so a ping probably isn't going to be helpful. What if you do curl https://api.spotify.com/v1/albums. You should get an error saying No token provided, but it'll at least show there is a connection being made
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>curl https://api.spotify.com/v1/albums
curl: (7) Failed to connect to api.spotify.com port 443: Timed out

C:\Users\Administrator>
 
Odd, it's going to be an issue somewhere between your server and them, if you'd like to create a ticket at themehouse.com we can get you a refund since you're not able to get it to work
 
Top Bottom