Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixes to the playlist fetcher, should be rewritten in the future.

  • Loading branch information...
commit 77c48d4541d83d6bc87118ebe4bba53da5dbae98 1 parent 7545480
Vilhelm K. Vardøy authored October 25, 2011

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. 8  spotify.c
8  spotify.c
@@ -301,8 +301,6 @@ static sp_playlistcontainer_callbacks playlistcontainer_callbacks = {
301 301
 
302 302
 static void playlistcontainer_complete(sp_playlistcontainer *pc, void *userdata)
303 303
 {
304  
-	spotify_object *p = (spotify_object*)userdata;
305  
-	p->playlistcontainer = pc;
306 304
 	sp_playlistcontainer_remove_callbacks(pc, &playlistcontainer_callbacks, userdata);
307 305
 }
308 306
 
@@ -315,10 +313,10 @@ PHP_METHOD(Spotify, initPlaylistContainer)
315 313
 		RETURN_TRUE;
316 314
 	}
317 315
 
318  
-	sp_playlistcontainer *tempcontainer = sp_session_playlistcontainer(p->session);
319  
-	sp_playlistcontainer_add_callbacks(tempcontainer, &playlistcontainer_callbacks, p);
  316
+	p->playlistcontainer = sp_session_playlistcontainer(p->session);
  317
+	sp_playlistcontainer_add_callbacks(p->playlistcontainer, &playlistcontainer_callbacks, p);
320 318
 
321  
-	while (p->playlistcontainer == NULL) {
  319
+	while (!sp_playlistcontainer_is_loaded(p->playlistcontainer)) {
322 320
 		sp_session_process_events(p->session, &timeout);
323 321
 	}
324 322
 

0 notes on commit 77c48d4

Please sign in to comment.
Something went wrong with that request. Please try again.