Is Jamcast plugin code the best way to start?

Jun 16, 2013 at 8:07 PM
Hi there,

I'm just getting started with Libspotify and Libspotify.NET. There's a lot to this from a newbies point of view. Is the best way to start to use some of the API classes from the Jamcast plugin to get a sort of more understandable collection of models to work with? I know you've been using the plugin as a kind of go to reference on how to use the API, but is it just better to strip that down for useable classes and use those instead to get the jist of things? Or am I better off starting from scratch?

I normally try to avoid blindly taking code, since it means I don't generally understand what's happening behind the scenes. True, I know Libspotify is a library in itself anyway, it just feels worse when you're grabbing source files as opposed to referencing a library. I hope this makes sense.

I can't wait to get using your library, it looks good, from what I understand of it.
Jul 21, 2013 at 2:40 PM
Hi Craig,

Saw your post on Stack but missed this back in June. Sorry about that.

I think the Spotify Plugin for Jamcast implementation is in an excellent resource for getting started with libspotify and libspotify.NET as it touches a good bit of the libspotify API and it works well. However, you should be aware that libspotify is internally threaded and callback driven -- a perfect fit for UI based applications. But when used with Jamcast, we are interacting with network clients and ultimately the Jamcast API where requests to Spotify are synchronous in nature, so you'll see a lot of thread synchronization in an effort to stay on a single thread. This complexity may not need transfer to your use case.

With respect to some specifics in your Stack thread, I do know that the Spotify Plugin for Jamcast has no issues with loading playlists and playlists containers. I recall libspotify does differentiate between loading of the playlist object itself (it's metadata) and the playlist items, and there are callbacks and object states corresponding to each. I got what I needed to this effect from the libspotify docs and their sample code. Perhaps some trial and error. :)

Let us know how you do.