Spotify autoplay link

In settings it says that Musicbox can automatically start playing after startup if given a URL. My goal is to get the autoplay at startup to play a specific Spotify playlist.

I’ve tried giving it an HTTP and a Spotify URI copied from the playlist in the Mac version of Spotify but no luck.
Console reports error directory of file not found (makes sense)

Is this not possible or am I missing something important

Never tried it myself but the mechanism just uses MPD commands and should be entirely possible given a URI that Mopidy understands. If I wanted to use “Billboard Hot 100” at http://open.spotify.com/user/billboard.com/playlist/6UeSakyzhiEt4NB3UAd6NQ I would set the pimusicbox setting to spotify:user:billboard.com:playlist:6UeSakyzhiEt4NB3UAd6NQ

Somewhat related:

With the upcoming Mopidy-Spotify 2 + pyspotify 2, http://open.spotify.com and http://play.spotify.com URIs will be interpreted correctly too.

Now we just need to switch from just URI scheme matching to URI prefix matching in Mopidy for Mopidy to route these URIs to the correct backend as well

Spotify autoplay link
Ref. https://github.com/mopidy/mopidy/issues/696.

That should work indeed. Does it, @KevinAWolfe ?

Perhaps. Pardon my naivete but is @jodal’s discussion about Mopidy-Spotify 2 + pyspotify 2 something I can implement now or is it something I need to wait for a general, stable release in order to use?

pyspotify 2.0.0b3 is out on PyPI.

Mopidy-Spotify 2 is still in development, and not useful yet. I’ll try to remember to update this thread when I push a first prerelease to PyPI.

If you want to have a closer look, development happens in the feature/pyspotify2-rewrite branch at https://github.com/mopidy/mopidy-spotify/tree/feature/pyspotify2-rewrite.

Hi everyone,

i created an android app to start play spotify on headset/bluetooth device connect. Its currently in Alpa - for free. Anyone testing it would be appreciated -> https://play.google.com/apps/testing/com.dasanderl.spotifyautoplay

A feature where you might pass in the playlist which should be played could be added as well, right now the app just resumes where spotify last played.

Bye, Andi

Please start a new thread instead of hijacking a 1.5y old thread.

can confirm solution from kingosticks works if you adjust settings straight on settings.ini (so not via GUI because of 40char limit)

Her Edwin2014, great catch! Where would you place the url in the settings.ini? Can’t seem to finde the line of code.

It should be the setting with the big comment describing the autoplay functionality…
i.e. autoplay = spotify:user:billboard.com:playlist:6UeSakyzhiEt4NB3UAd6NQ

1 Like

Thanks, has this been tested before or is it still theory? Mine did not autoplay, maybe it has to be put inside quotes?

Edit: It worked after a reboot

Spotify autoplay link

Is there a similar tag as “autoplay = [something]” in modipy?? I can not find it.

Spotify autoplay link

My community is based around artists posting their music for others to hear.

When a user posts a soundcloud, the iframe works flawlessly. However it appears there is no auto-iframe for spotify tracks and playlists.

How should I go about setting this up if possible? I have all the embed codes from spotify but unsure how to set up in discourse.

Thank you!

Spotify autoplay link
LofiZone.com:

When a user posts a soundcloud, the iframe works flawlessly. However it appears there is no auto-iframe for spotify tracks and playlists.

Soundcloud oneboxes work great with Discourse. For Spotify, if you add a Spotify link to a song or playlist to a Discourse post, it creates a onebox, but not a Spotify player.

You can allow users to add the Spotify embed code (iframe) to Discourse posts by adding https://open.spotify.com/embed/ to your site’s allowed iframes site setting. This will create an audio player that lets users listen to 30 second snippets of tracks.

4 Likes

I will certainly look into making the iframe capability available to my users.

Is there any way to automatically convert regular Spotify links to the embedded iframe? I used invision power board for awhile and their software would create embeddables for a wide range of media services including spotify. However I understand their software is very expensive and not open source.

Spotify autoplay link
LofiZone.com:

Is there any way to automatically convert regular Spotify links to the embedded iframe?

It is technically possible, but I’m not sure it’s something I’d want to rely on. As an example of how to do it, the Spotify link https://open.spotify.com/track/39zWYYZStDgWi32sOU9AX4?si=BLFB8HxuQNC-OaHtwD_E4A can be converted to an iframe by adding /embed to the link’s path and then using that URL as the iframe’s src:

<iframe src="https://open.spotify.com/embed/track/39zWYYZStDgWi32sOU9AX4?si=BLFB8HxuQNC-OaHtwD_E4A"></iframe>

2 Likes

Good thinking, yes that appears that it would do the trick. Do you know what files I would need to edit to get such results? If I knew the file(s) I am confident I could code it in myself!

Spotify autoplay link
LofiZone.com:

Do you know what files I would need to edit to get such results?

If your Discourse site is self-hosted, I think the best approach would be to create a Spotify onebox plugin. If you open your web inspector on a Spotify page, you’ll see that the data you would need to create a Spotify player from an iframe exists in the page’s meta tags. You probably need to use key commands to open your web inspector. Spotify seems to block right clicks.

You can find examples of how oneboxes are created here: GitHub - discourse/onebox: A gem for turning URLs into website previews.

3 Likes

Spotify quietly updated its autoplay feature with a seriously frustrating quirk. When you play music on your Spotify Connect devices, autoplay is now enabled by default and there’s no way to turn it off. This means that after your album, playlist, or your song selection is done playing on any device other than your phone or computer, Spotify will continue playing recommended tracks indefinitely.

Users have voiced their complaints in the Spotify Community forum for weeks, filling an ongoing thread with their grievances. It caught the attention of a Spotify Community moderator, who provided some more information about the issue — which is apparently a feature and definitely not a bug.

“We can confirm that Autoplay is the default setting for any connected device”

“We can confirm that Autoplay is the default setting for any connected device,” a Spotify spokesperson said in an emailed statement to The Verge. “This means that whenever you play music from Spotify on a device other than your phone or computer, Autoplay will be enabled, and tracks will be added to continue your listening experience.”

However, the spokesperson says that “Autoplay will not commence if you play a track, album, or playlists with Repeat enabled.” That obviously doesn’t help if you want an album or playlist to end after it’s done playing. The spokesperson also mentioned that Spotify updated the experience “during the last couple of weeks.”

In the aforementioned thread, the Spotify moderator suggested that users cast their votes in a post in the Spotify Idea Exchange to show support for an option to toggle autoplay on and off, but the page that the moderator links to doesn’t address that exact issue. In the post’s description, the user asks for Spotify to bring back the settings menu on the Spotify web player that was recently removed, which prevents users from changing their autoplay options when listening from the web player.

Other than the title of the post: “[AutoPlay] Option to toggle Autoplay on/off across all devices/platforms,” it doesn’t have much to do with the problem users were initially discussing, causing confusion in that entire thread — comments on the post concern both the settings menu and the problem with Spotify Connect. It’s unclear whether bringing back the settings menu on the web player will help resolve the autoplay issue on connected devices (or vice versa).

When a post on the Spotify Idea Exchange receives over 180 votes in under six months, the suggestion gets the “Live Idea” label and will be looked at by the Spotify team. Right now, this so-called idea is currently a “Good Suggestion,” meaning it received more than 50 votes in under three months. The status should be upgraded soon, though, since it has a total of 259 votes at this time of writing.

It’s ironic that Spotify calls something that’s essentially a bug report an “idea.” After all, music on connected devices wasn’t set on an infinite loop too long ago. With Spotify projected to increase its user base from 381 million to 400 million users by the end of this year, it’s going to have a lot more users it needs to satisfy.

“At Spotify, we’re committed to delivering the best possible listening experience. We recently updated our Autoplay settings for connected devices, and are actively gathering feedback from the Spotify Community,” the Spotify spokesperson continued. “As always, we’ll continue to evolve this feature over time based on user feedback.”