Tip: How to get Spotify (Qt) running

Download and compile https://github.com/kraxarn/spotify-qt.git

Sign in to dashboard.spotify.com and create a new app.
Set redirecturl to http://localhost:8888

Copy your client ID and secret for newly created app.

Sign in by launching spotify_qt from terminal

It will fail but there will be an output that you need to paste in otterbrowser.

https://accounts.spotify.com/authorize?client_id={client_id}&response_type=code&redirect_uri=http://localhost:8888&scope=playlist-read-collaborative

spotify

I dont have premium (Apple Music FTW) Hope it works for all with spotify premium accounts.

10 Likes

Could you share your decorator and color settings? Look pretty cool!

Its @nhtello theme https://github.com/unarix/haiku_darkstyle

1 Like

Ah, ok, I thought it was something different for some reason :slight_smile:

Would love to try this, but I got stuck in step 1 - CMake cannot find Qt5Config.cmake, qt5-config.cmake or FindQt5.cmake. I could not locate any of them either (I have qt5 and qt5tools installed running 64 bit Haiku).

Works OK here (just build version 2.4 for gcc2h (stats up OK asking for Cliend ID and Client secret), if you are running gcc2hybrid, make sure you have Qt5 installed and switch gcc to gcc8 with “setarch x86” in Terminal

Second try :slight_smile: If you are working on a recipe you need “cmd:qdbuscpp2xml$secondaryArchSuffix” :slight_smile:

A wip recipe where you could build it and check: https://paste.ubuntu.com/p/w9Wxp33vDs/

2 Likes

Good day @konrad,

Kudos!!:+1::+1::+1:

Regards,
RR

1 Like

Thanks a lot. Never used haikuporter before, but managed to build it using your recipe. :slight_smile:

Sadly, after pasting the initial spotify_qt output into otterbrowser (which gives the success message), spotify-qt crashes (segment violation) upon launch. Btw, I have Spotify Premium.

I don’t have a premium account there, so I can’t check that one, only can provide the basics :slight_smile:
If there is something missing please let me know :slight_smile:

spotify_qt is now available to try out, you can install it over HaikuDepot or pkgman :slight_smile:

Hello, I seem to have the same issue as Jim. Also have spotify premium.

Pastebin

https://pastebin.com/2BNDZS2J

You can report it here https://github.com/kraxarn/spotify-qt/issues.

I have reported it there, but I am unsure if the author has a haiku test environment and is unable to trace the bug (speculation based on that I don’t see Haiku mentioned on the github page)

1 Like

There is no Haiku mention on their github as it builds out of the box, thanks for reporting, replied there also :slight_smile:

I managed to get the UI up by commenting out initialization of the playlist in createCentralWidget. But it seems the real issue is that spotifyd is not bundled with spotify-qt. So you need to build this first and then provide the path in the settings dialog of spotify-qt.
I have not tried to build Spotifyd (found at https://github.com/Spotifyd ), it seems to be built in Rust.

1 Like

Hello, author here.

Interesting to see people trying to run the application under Haiku, I’m very happy to help out where I can. I’m unable to reproduce the issue myself, as it seems to work fine for me without any modifications from a clean install. If the issue is related to loading playlists, maybe the issue only occurs with certain playlist names? The QString related messages in the dumps seems to indicate something like that.

It also currently doesn’t provide an actual playback client, correct. I’m not sure if spotifyd works under Haiku, as Rust doesn’t seem very well supported there. I was thinking of using the Web Player API to provide a playback client in the application itself, but I felt like it kind of defeated the entire purpose of the app, being lightweight, so it didn’t make much sense. It also uses Widewine DRM, which is not very well supported. Spotifyd is the “officially supported” client, but any should work.

As for packaging the application, that’s very nice of you, I’ll make sure to add it in the readme. Just a few things though. Firstly, my name is spelled as “kraxarn” in all lowercase. Secondly, when calling cmake, please call it with -DCMAKE_BUILD_TYPE=Release unless you’re troubleshooting issues, and -DGIT_TAG=ver to make the current version registered in the application properly, replacing “ver” with the current version, like “v2.5”, so for example -DGIT_TAG=v2.5. CMake might fail to generate the necessary stuff otherwise. See my PKGBUILD on Arch for some info.

13 Likes

In my case, the crash happens as no playlists can be found. I added a check for sptPlaylists.count() > 0 to get around it:

// Load tracks in playlist
auto playlistId = settings.general.lastPlaylist;
// Default to first in list
if (playlistId.isEmpty() && sptPlaylists.count() > 0)
	playlistId = sptPlaylists->at(0).id;
3 Likes

Ah, that makes more sense, didn’t think about that. I’ll fix it for the next version, thanks for finding the issue.

5 Likes