Closed mathroc closed 9 years ago
There is already a newer version of libspotify >12.xxx available, I would suggest to remove the radio integration and update to the newest version.. :)
I agree... but I don't have time to work on removing the radio support. If you want and can, you're welcome to submit a pull request ;)
Sorry but I don't have the time either.. is it just that radio part that makes the current source incompatible to the libspotify > 12.xx ?
I am not sure in fact. Didn't try.
Mh you may take a look at spotimc, also at github: https://github.com/mazkolain/spotimc/
There is more than just the removed radio-functionality that is the problem. Few of the methods changed aswell.
EDIT: Oh by the way, above changed methods changed in 12.x, not in 11.x
Today I got most of it working by removing all radio code and adding the missing parameters. I kept getting Segmentation Fault errors, apparently you have register ALL callbacks, even the ones you don't use, don't assign the value 0 but use NULL like this:
m_callbacks.offline_error = NULL;
m_callbacks.credentials_blob_updated = NULL;
m_callbacks.connectionstate_updated = NULL;
m_callbacks.scrobble_error = NULL;
m_callbacks.private_session_mode_changed = NULL;
Great work. If you upload a diff -U3 somewhere and post the link, or if you make a pull request I can compile and test if it works also on Win XP, Vista and Win7 32 & 64bit.
Sorry, took longer than I wanted to. I forked and created a new branch there. See https://github.com/djurict/spotyxbmc2/tree/Eden-libspot12
great, will test it. Could you submit a pull request when you think it's ready ? Thank you
Hi, is it acceptable that the radio is not working with libspotify v12? I look forward to hear results from tests. I only could test it on Ubuntu 12.04 amd64, but it all works there
I wounder what the benefits with v12 are? I personally actually uses the radio feature so I wont upgrade unless there are some really nice new threats.
Maybe the problem with stuttering sound is solved?
There is not really a benefit at this moment, personally I had some strange issues with spotyxbmc2 flooding my logfile because of the BackgroundStarred Thread which never ended. I wanted to see if this was specific to v10.
The thread still never seems to end but at least it is not flooding because it seems there is some requests per second limit (ratelimit) in v12. Since I am on 100/100 mbit connection it might only be noticable when you have a fast connection.
In addition, the modifications I made should help you upgrading to a new version where they might have put the radio back in. I faced quite some challenge in finding the issue which caused the "Segmentation Fault" error.
Will test on Windows and report my findings here. Update: Sorry for delay, my daughter was born. I will test later, but have too little spare time these days.
About this compatibility issue, in my opinion, they didn't exactly drop the radio support.
As we can see, the main function used in SpotyXBMC that isn't anymore in the 12.1.51 release of libspotify is : sp_radio_search_create()
which mainly take as argument the begining, ending year, and genre of the radio.
In the latest spotify desktop client, it's possible to start a radio from anything (genre, artist, album, song etc ...) so the old sp_radio_search_create()
is no longer relevant at all.
Instead, I am pretty sure there is a way to recreate a radio from sp_search_create()
It takes a string as a query, and query could be like : genre:blues year:1940-1960
which cover pretty much what the old call does.
The only difference I can think of is that a radio is pretty random, while a search is expected to be more deterministic.
(When I launch the radio I never want to hear the same song twice, while when I search for something I really expect the search result to look like the last time)
Also in the desktop, when launching a radio, there is no way (or I don't know how) to see the 'playlist' of the radio.
My opinion is that in the desktop, they are calling sp_radio_search()
with a random track_offset
and a track_count
of 1.
And then they just add this to the current playlist, and maybe cache the next song, or the 10 next songs in case the user doesn't like this one and want to listen to the next song.
sp_search* sp_search_create ( sp_session * session,
const char * query,
int track_offset,
int track_count,
int album_offset,
int album_count,
int artist_offset,
int artist_count,
int playlist_offset,
int playlist_count,
sp_search_type search_type,
search_complete_cb * callback,
void * userdata
)
Anyway, as I think radio support will eventually drop server side, we should cover our back, and try to recreate the radio feature with what the lib provides.
not relevant anymore
I just had a look at libspotify 11.1.60. It seems that they removed radio support :-/ Personally I don't really used them but I guess it would be a bad surprise for some people if we upgrade now.