Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Latest commit

 

History

History
271 lines (220 loc) · 9.97 KB

CHANGELOG.md

File metadata and controls

271 lines (220 loc) · 9.97 KB

This change features a few large improvements:

  • A bunch of API calls have been improved to remove FFI pointer juggling. Methods such as e.g. #session_create, or #link_as_string are now much easier to use. See #19 for more details.
  • Documentation has been much improved by (more or less) copying documentation from libspotify docs, and adding some notes and examples to it.
  • All API calls are now called in a specific background thread, powered by the Performer gem. This replaces the previous mutex lock around all API calls, and possibly fixes a lot of random deadlocks. See #23.
  • API reference documentation (YARD) has been added to all methods.
  • Errors are no longer symbols, but actual errors inheriting from Spotify::APIError

Keep in mind that these changes are not backwards-compatible.

  • [d80b9249] Make one class for each kind of error, instead of using symbols
  • [0da56807] Move utility methods to Spotify::Util
  • [72ee2526] Officially drop support for Ruby 1.9
  • [dc492876] Perform all API calls in a specific Spotify thread
  • [f5244743] A warning is now displayed on API mismatch instead of an error
  • [dda1bc53] null pointers have been replaced by nil
  • [98b5b1e0] Automatically encode country codes in #session_user_country
  • [c8ad624e] Add #code and #symbol to Spotify::Error
  • [77d1b978] Do not raise an error in Spotify.try when the resource is loading
  • [f8293775] Print to stderr instead of stdout when libspotify cannot be found
  • [c7042db6] Added Spotify.log (private API)
  • [e09f64cc7] Add initial windows support

I’ve noticed callbacks cause libspotify to segfault. Not sure why; could have something to do with with FFI callback support.

  • [5245d932b] #link_create_from_string now accepts non-UTF8
  • [349dfdc61] #link_create_from_string now accepts strings with NULL-bytes in them (it clips the string)
  • [349dfdc61] #link_create_from_string now accepts empty strings without crashing
  • [ef7ae9390] #link_create_from_string no longer throws a warning on UTF-8
  • [b775947d6] Fix retaining class bug on Ruby 1.9.2

This release also breaks backwards-compatibilty, now all functions accepting structs also have type-safety protection, similar to what happens for pointers in v12.4.0.

Additionally, gem now supports JRuby and Rubinius explicitly!

  • [a450bf27b9] implement type safety for all struct arguments
  • [44b35d6432] automatic release for Subscribers struct
  • [1c88809139] force application_key to be assigned as a string in SessionConfig
  • [c9bc974d44] Subscribers now always have a :subscribers member
  • [05e691c2aa] allow instantiating Subscribers from NULL
  • [c83c9feb1c] Enable rbx-19mode on travis-ci.org
  • [3e153a48f4] Enable jruby-19mode on travis-ci.org
  • [72aadf4906] Use UTF8 everywhere, even in struct fields
  • [e05b286118] Make Subscribers enumerable

This release breaks backwards-compatibility, as functions will no longer accept pointers of any other type of what they expect. This means that you must wrap any pointers in a Spotify::ManagedPointer of the appropriate type before using them to call API functions.

Callbacks now receive actual structs (by reference) in their params, instead of a pointer which needed to be manually casted.

  • [1fe1abed6] refactor retaining class for all managed pointer
  • [af54c02e1] naive type-checking for all spotify objects
  • [1d6939cd8] monkeypatch-add FFI::AbstractMemory#read_size_t
  • [b9ce8941c] unlock mutex for Spotify::Error.explain (considered thread-safe)
  • [fd2490728] add Spotify::Struct#to_s/to_h
  • [1cbaf4a64] callbacks now receive structs by reference instead of raw pointer

Lots of internal and external changes. You could almost say it’s a rewrite.

  • [0ee03487a] added a Spotify::ManagedPointer (new Spotify::AutoPointer) for every object
  • [0ee03487a] all functions now always return auto pointers
  • [a88920c22] it’s now possible to create a Spotify::Subscriber with a count
  • [aa26b1ed2] have all callbacks retain their pointer
  • [a72469b04] use new libspotify gem for attaching libspotify dynamic library
  • renamed the repository from libspotify-ruby to spotify
  • [345b47472] all structs can now be initialized with a hash
  • [e54f1c806] SessionConfig now accepts string as application key
  • [37f1f883d] Added Spotify.try(method), and removed bang-calling notation
  • [6e51b6c4e] Added a mutex around every Spotify API call

I might’ve missed something. Read the commits for the nitty gritty.

  • fix SessionConfig missing ca_certs_filename struct field on Linux

v12.1.0

  • erroneously released (wrong version number, does not follow version policy)
  • add support for search_playlist (retrieves a playlist object directly from a search)
  • use error checking in Spotify::Pointer add_ref and release
  • add Spotify::Pointer, a FFI::Pointer that manages spotify pointer refcount!
  • wrap object-creating methods that returns Spotify::Pointers, e.g. albumbrowse_create!
  • add error-checking variants of all functions that return an error e. g. session_relogin!
  • add Spotify::Error with it’s .explain and .disambiguate
  • upgrade to libspotify v12.1.45
  • make the error message on missing functions more friendly
  • fix changelog formatting
  • upgrade to libspotify v11.1.60
  • raise more helpful error on missing libspotify
  • upgrade to libspotify v11.1.56
  • map :image_id to a ruby string instead of a pointer
  • allow non-UTF8 strings for link_create_from_string and login password
  • make all strings (both input and output) be in UTF8
  • make :sampletypes an array of actual FFI types that can be read
  • mark ALL libspotify functions as blocking
  • fix Spotify::Subscribers for empty subscribers
  • Up FFI version dependency to v1.0.11 (Spotify::Bool is no more)
  • upgrade to libspotify v10 (see changelog for details)
  • Spotify::Subscribers now supports retrieving members by array index
  • mark sp_session_player_load as blocking
  • upgrade to libspotify 9
  • loosen up dependency version constraints
  • improve documentation and remove YARD plugin
  • add specs for return type and argument types of functions
  • fix return type and arguments for a bunch of functions
  • add typedefs for spotify pointers (makes better docs)
  • allow setting SessionConfig boolean values to true/false
  • optimize by using :buffer_out where applicable
  • fix arguments of image_create
  • mark some session functions as blocking
  • upgrade to libspotify v0.0.8 compatibility
    • 96k bitrate
    • offline functionality
    • improved image support
  • improve documentation
  • adjust definitions for 1.8.7 compatibility
  • insignificant
  • first release
  • add all function definitions and structs

v0.0.0

  • release to register rubygems.org name