0

I was quite happy with my spotify app on top of libspotify 12.1.51 and just made a *.msi and installed it on my system. For some reason I do not get my playlists anymore.

What I do get is a lot of "PlaylistAddedCallback" callbacks after sp_session_playlistcontainer call. (issued directly after successful login)

00:00:02.360: sp_session_playlistcontainer

00:00:02.449: - NotifyMainThreadCallback

00:00:02.453: sp_session_process_events

00:00:02.468: sp_session_process_events

00:00:02.485: - NotifyMainThreadCallback

00:00:02.490: - PlaylistAddedCallback

00:00:02.505: - PlaylistAddedCallback

...

Eventually it ends with PlaylistContainerLoadedCallback. I then reissue the sp_session_playlistcontainer command and get an error

...

00:00:02.629: - PlaylistAddedCallback

00:00:02.632: - PlaylistAddedCallback

00:00:02.636: - PlaylistContainerLoadedCallback

00:00:02.639: - LogMessageCallback. Message:08:28:32.989 I [user_cache:135] UserCache::initiateGetUsers() will query for 100 users

00:00:02.641: sp_session_playlistcontainer

00:00:02.643: libspotify-sharp internal error, creating playlist container for the second time

I do not get any container, and after 5 minutes I get

00:05:02.733: - LogMessageCallback. Message:00:11:16.978 E [playlist:1978] Unable to save file: playlist.bnk

00:05:02.737: - LogMessageCallback. Message:00:11:16.988 E [social-mgr:818] Unable to save file: social_manager.bnk

00:05:02.740: - LogMessageCallback. Message:00:11:16.988 E [user_cache:107] Unable to save file: user-cache.bnk

When I run it in Visual studio this is the simple log I get

00:00:02.960: sp_session_playlistcontainer

00:00:02.991: sp_offline_num_playlists 0

00:00:03.065: - NotifyMainThreadCallback

00:00:03.105: sp_session_process_events

00:00:03.110: - NotifyMainThreadCallback

00:00:03.117: - PlaylistContainerLoadedCallback

I do believe I send sp_session_process_events frequently enough, and all calls to the lib is done on the same thread.

I also logout properly at exit.

I use the same cache directory. It did work once, which suggests timing, and the program is slightly faster when installed.

No problem when running it form within VS 2010 (well, not related to this...)

  • Am I using the libspotify incorrectly?

  • Am I only supposed to call sp_session_playlistcontainer once?

  • Why do I get all the PlaylistAdded callbacks?

Any ideas?

Community
  • 1
  • 1
bes51659
  • 28
  • 4

1 Answers1

0

Sorted. Problem was not installing the app as such. What released my "bug" seemed to be that even if I have the same cache, same PC, same user, libspotify can tell the two clients apart. Starting the installed app triggered a lot of updates (with major timing consequences) I do no longer see when running debugger. (Guesswork)

The bug. It seems like playlist can only be requested once per session. It started to work when I made sure that was the case. I did not find anything about that in the docs though.

bes51659
  • 28
  • 4
  • I mean "ask for playlistCONTAINER" App can still not save to cache, so there might be a conflict using the same cache for the installed application as I do when running the debugger. – bes51659 Jun 03 '14 at 22:07