Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

[Linux] Spotify URI only opens start page

Solved!

[Linux] Spotify URI only opens start page

Hi,

 

I'm using Spotify version 1.0.49.125.g72ee7853 on Linux Mint 18 with kernel 4.4.0-21-generic.

 

I tried to open a track by clicking on a Spotify-URI in Slack (attached image below).

 

Expected behaviour:

Spotify should open and the track should be selected, like when you insert the Spotify-URI into the search-bar and click enter (which is working fine, btw).

 

Current behaviour:

Spotify opens, but only on the start page. Also it is opening a new instance instead of using the already existing one.

 

Next thing I tried is to open Spotify from the command-line with the following commands (I got this parameters from spotify --help):

spotify --uri spotify:track:03bYLN5H3OjZ6CIpBcd4W3
spotify --url spotify:track:03bYLN5H3OjZ6CIpBcd4W3

this also DOES NOT work.

 

When my colleague clicks on the link with his Mac it is working as expected.
So please fix this on Linux, thank you!

 

Greetings

Joriktos

Screenshot from 2017-05-12 12-28-56.png
Reply

Accepted Solutions
Marked as solution

Yes. There are a few bugs related to opening tracks in the client.

 

1. The client no longer just takes the uri as an optional argument (which the old client did), you need to use the --uri option like you figured out.

2. All options that takes argument like --uri, currently needs to be in the form --option=argument. spotify --uri=spotify:track:03bYLN5H3OjZ6CIpBcd4W3 will work.

3. If you try to start the client after it is already started, it unfortunately starts a new process. Correct behaviour (which the old client had) would be to move the window to the front and if you supply an optional uri, send that to the already opened client.

 

They are all tracked internally in our bug tracker.

 

Then the behaviour of what to do with a uri has also changed over time. In the beginning track uris would auto-play while album/artist/playlist uris would only change the view without changing what was played. Then later, clicking on album/artist/playlist uris would also start auto-play. The current behaviour is to only move to the view, even for track uris.

 

There is a workaround to autoplay track uris though. Specify starting position.

 

If you paste spotify:track:03bYLN5H3OjZ6CIpBcd4W3#1:23 it will start playing at 1 minute and 23 seconds into the song.

 

Since # is a comment in bash, you would need to type something like:

 

spotify --uri='spotify:track:03bYLN5H3OjZ6CIpBcd4W3#1:23'

 

Also, you can't specify beginning of track with #0:0. It will just be ignored (yay, more bugs). You can however specify fractions of seconds so, unless you have super hearing, this will autoplay beginning of the track:

 

spotify --uri='spotify:track:03bYLN5H3OjZ6CIpBcd4W3#0:0.01'

 

View solution in original post

4 Replies
Marked as solution

Yes. There are a few bugs related to opening tracks in the client.

 

1. The client no longer just takes the uri as an optional argument (which the old client did), you need to use the --uri option like you figured out.

2. All options that takes argument like --uri, currently needs to be in the form --option=argument. spotify --uri=spotify:track:03bYLN5H3OjZ6CIpBcd4W3 will work.

3. If you try to start the client after it is already started, it unfortunately starts a new process. Correct behaviour (which the old client had) would be to move the window to the front and if you supply an optional uri, send that to the already opened client.

 

They are all tracked internally in our bug tracker.

 

Then the behaviour of what to do with a uri has also changed over time. In the beginning track uris would auto-play while album/artist/playlist uris would only change the view without changing what was played. Then later, clicking on album/artist/playlist uris would also start auto-play. The current behaviour is to only move to the view, even for track uris.

 

There is a workaround to autoplay track uris though. Specify starting position.

 

If you paste spotify:track:03bYLN5H3OjZ6CIpBcd4W3#1:23 it will start playing at 1 minute and 23 seconds into the song.

 

Since # is a comment in bash, you would need to type something like:

 

spotify --uri='spotify:track:03bYLN5H3OjZ6CIpBcd4W3#1:23'

 

Also, you can't specify beginning of track with #0:0. It will just be ignored (yay, more bugs). You can however specify fractions of seconds so, unless you have super hearing, this will autoplay beginning of the track:

 

spotify --uri='spotify:track:03bYLN5H3OjZ6CIpBcd4W3#0:0.01'

 

Thanks for the quick and detailed answer!

I'll also send this to the Slack team, I think they'll add a workaround asap 😉

I am not sure how slack can fix anything. As far as I know, these are all bugs in our client.

I don't know how Slack starts the spotify client, but it is highly probable that they're also calling it with an cli command. So they can use the "solution" you described in point 2. Thanks for that!

Suggested posts