Skip to main content

scrobblenaut 3.1.0 copy "scrobblenaut: ^3.1.0" to clipboard
scrobblenaut: ^3.1.0 copied to clipboard

A deadly simple LastFM API Wrapper for Dart. So deadly simple that it's gonna hit the mark.

3.1.0 #

Tooling #

  • Minimum Dart SDK raised to ^3.13.0, required by xml ^7.1.0. The 7.x major rewrote namespace handling and XPath; the parsing surface this package uses (XmlDocument.parse, findElements/findAllElements, innerText) is unchanged, and the whole suite passes against it.
  • Dependencies raised: xml ^7.1.0, crypto ^3.0.8, convert ^3.1.2, dio ^5.11.1, meta ^1.19.0; dev dependencies lints ^6.1.0, test ^1.33.0, json_serializable ^6.15.2, build_runner ^2.17.1.
  • Clean under lints 6: redundant library names dropped, one initializing formal fixed; dart analyze --fatal-infos . reports no issue on the whole repository.

Bug Fixes #

  • Authentication:
    • TrackMethods.multiScrobble now fails with a ScrobblenautException on a client without authentication, like every other authenticated method, instead of sending an unsigned request.
  • Serialization:
    • Track.toJson now writes duration in milliseconds, the unit Track.fromJson and track.getInfo use, so a toJson -> fromJson round-trip no longer shifts it by 1000x. Scrobble.duration (seconds) is unchanged.
    • toJson now writes nested collections in the Last.fm wrapper shape ({"tag": [...]}, {"track": [...]}, {"album": [...]}, {"artist": [...]}, {"link": [...]}) and booleans as 0/1, so toJson -> fromJson is lossless for Track, Album, Artist, Tag, User, Bio, Taggings and the search results.
    • Bio.links now also accepts a list of links, not only a single link object.

Features #

  • Scrobbling:
    • TrackMethods.multiScrobble now accepts lists of any length: they are split into sequential requests of at most 50 scrobbles (Last.fm's limit) and merged into a single ScrobbleResponse whose counters are the sums and whose entries keep the input order. ScrobbleResponse.merge builds that combined response. An empty list fails without sending anything.
  • Networking:
    • Transient failures are retried with an exponential backoff: timeouts, connection errors, HTTP 429, HTTP 5xx and Last.fm error 29 ("Rate limit exceeded"). retryLimit (default 5) is the total number of attempts, 1 means no retry; the delay starts at 500 ms, doubles, is capped at 8 s, and honours a Retry-After header in its seconds form. A 4xx that is not a rate limit is never retried, and after the last attempt the original exception is rethrown.
    • proxy: 'host:port' is now actually applied on native platforms (HttpClient.findProxy), instead of being accepted and ignored. A malformed value throws ArgumentError at construction; on the web the value is documented as ignored.
    • LastFMException now carries the Response it was generated from, so the status code and headers stay readable by callers and by the retry layer.

Documentation & Examples #

  • example/api_values.dart is committed and reads its values from String.fromEnvironment (LASTFM_API_KEY, …): a clean checkout analyzes and runs the examples without creating a git-ignored file, and no credential can be committed.
  • CI analyzes the whole repository (dart analyze --fatal-infos .) instead of the library only; README documents how to run an example with --define.

3.0.2 #

CI Maintenance (no API changes) #

  • Set up automated publishing to pub.dev via GitHub Actions (OIDC) with a release gate on the publish branch. CREDENTIAL_JSON-based OAuth publishing is no longer used.

3.0.1 #

Documentation & API Robustness Improvements #

  • API Robustness:
    • Fixed CastError when Last.fm XML-to-JSON engine returns a single item as a Map instead of a List across UserMethods (getRecentTracks, getLovedTracks, getFriends, getTopAlbums, getTopArtists, getTopTracks, getTopTags, and weekly chart methods).
    • Added parseLastFMList helper for safe extraction of single or multiple item response nodes.
  • Extensions:
    • Added optional albumArtist parameter to TrackExtension.scrobble and TrackExtension.updateNowPlaying.
  • Documentation:
    • Completely overhauled README.md with modern Dart 3 setup, active badges, and comprehensive examples for unauthenticated and authenticated usage.
  • License:
    • Migrated from custom Nebulino Public License to standard OSI-approved MIT License.

3.0.0 #

Major Update - Dart 3, Modern Dependencies & Last.fm API Fixes #

  • Migrated to Dart 3 (SDK ^3.8.0) and sound null safety.
  • Upgraded dependencies:
    • dio to ^5.4.0 (using DioException and modern interceptor handlers)
    • xml to ^6.5.0 (migrated to innerText)
    • json_annotation to ^4.12.0 and json_serializable to ^6.8.0
    • lints to ^3.0.0 (replacing deprecated pedantic)
  • Authentication Improvements & Fixes:
    • Fixed auth.getMobileSession by switching to POST and using plain password (Last.fm removed support for authToken/password hashes).
    • Added LastFM.withSessionKey constructor to instantiate client with pre-existing session keys.
    • Added web/desktop token authentication support (LastFM.authenticateWithToken, SessionKeyGenerator.getSessionWithToken, SessionKeyGenerator.getToken).
    • Deprecated legacy authenticateWithPasswordHash.
  • Scrobble & Track Methods Fixes:
    • Added support for albumArtist in Scrobble, scrobble(), multiScrobble(), and updateNowPlaying().
    • Fixed 0-based array indexing for track.multiScrobble batch requests (0 to 49 instead of 1 to 50).
    • Fixed duration formatting in multiScrobble to pass integer seconds instead of a stringified object.
    • Fixed chosenByUser formatting in multiScrobble to send integer flags 1/0.
    • Fixed ignoredMessageCode parsing (codes 0-5) and added helper isIgnored getter in NowPlayedTrack and ScrobbledTrack.
  • User Methods:
    • Made user parameter optional in user.getInfo (defaults to authenticated user if omitted).
  • Regenerated code objects via build_runner.
  • Formatted and modernized codebase according to Dart 3 standards with zero analysis warnings/errors.

2.0.5+1 #

Fix dio/adapters #

  • Removed proxy support from dio.
  • Fixed support to Dart | Native & Js.
  • Updated dependencies.

2.0.5 #

Small version bump #

  • Add support to Dart | Native & Js.
  • Preparing for null-safety support.

2.0.4 #

Small version bump #

  • Add the possibility to login with already a md5 password.
  • Removed deprecation.
  • Update example.

2.0.3 #

  • Updated Copyright headline for a bump to Dart 2.8.0.
  • Updated the README.md.
  • Updated the pubspec.yaml.

2.0.2 #

Small bug-fix #

  • Remove remained print().
  • Fix README.md.
  • Fix CHANGELOG.md.
  • Fix build.ps1.
  • Fix clean.ps1.

2.0.1 #

  • Fix Artists in Tracks gained from user.getRecentTracks().

2.0.0 #

Major Update #

Status
  • Album object supported.
  • Artist object supported.
  • Tag object supported. (TagMethods.getTopTags not supported because is useless, no Tag attribute used)
  • Track object supported.
  • User object supported.
Dev Changelog
  • Add capability of applying UserMethods in User.
  • Created example-related. Watch them on ./example.
  • Fixed clean.sh.
  • Added .g.dart to make possible the usage from git in pubspec.yaml
  • Updated the README.md for Major Update.
  • Updated the CHANGELOG.md. This thing You're reading right now

1.0.5 #

Add capability of applying TrackMethods in Track #

  • Created new track example.
  • Fixed TrackMethods.getTags.
  • Changed lang in Methods into language
  • Updated CHANGELOG.md.
  • TrackMethods.scrobbleOnce() into TrackMethods.scrobble()
  • TrackMethods.scrobbleOnceFromObject() into TrackMethods.scrobbleFromObject()
  • TrackMethods.scrobble() into TrackMethods.multiScrobble()

1.0.4 #

Add capability of applying TagMethods in Tag #

  • Created new tag example.
  • Changed lang in Methods into language
  • Updated CHANGELOG.md.

1.0.3 #

Add capability of applying ArtistMethods in Artist #

  • Created new artist example.
  • Fixed some Future
  • Fixed some examples.
  • Updated CHANGELOG.md.

1.0.2 #

Add capability of applying AlbumMethods in Albums #

  • Created new album example.
  • Fixed version number
  • Updated CHANGELOG.md.

1.0.1 #

Fix Documentation #

  • Created lastfm_methods library.

1.0.0 #

Finally! First Release! #

All methods implemented

Status
  • Auth and No Auth method supported.
  • Album Methods supported.
  • Artist Methods supported.
  • Chart Methods supported.
  • Geo Methods supported.
  • Library Methods supported.
  • Tag Methods supported.
  • Track Methods supported.
  • User Methods supported.
Dev Changelog
  • Fixed Exception Handling on Spaceship.
  • Created ScrobbleObject() for helping in scrobbling.
  • Fixed linksExtractor() Helper.
  • Added timestampToSecondsSinceEpoch() for TrackMethods.scrobble() and derivatives.
  • Fixed Track.topTags.
  • Fixed LastFMException.generate().
  • Created POSTResponse Helper and ScrobbleResponseHelper.
  • Added a 'FIXME' bypass on duration parsing in Tracks.
  • Fixed Geo.getTopTracks() for the Track Duration problem.
  • Fixed Tag.count.
  • Created Taggings for User.getPersonalTags.
  • Modified some examples. Watch them on ./example.
  • Updated the README.md for First Release.
  • Updated the CHANGELOG.md. This thing You're reading right now

0.1.6 #

Huge update #

Seventh Pre-Release. One more to go...

  • Implemented Track Methods.
  • Fixed Artist toJson() missing method.
  • Updated the changelog.
  • Created NowPlayed Track helper.
  • Created NowPlaying Object.
  • Created Scrobble Response (renamed from Scrobble Response Helper).
  • Created Scrobbled Track helper.
  • Created helper library.
  • Created Track Result Object.
  • Added track example.
  • Added scrobble example.
  • Updated the README.

0.1.5 #

Sixth Pre-Release. Still, a long way... #

  • Implemented Tag Methods.
  • Fixed Tag attributes.
  • Updated the changelog.
  • Added tag example.
  • Updated the README.

0.1.4 #

Fifth Pre-Release. Still, a long way... #

  • Implemented Library Methods.
  • Updated the changelog.
  • Added library example.
  • Updated the README.

0.1.3 #

Fourth Pre-Release. Still, a long way... #

  • Implemented Geo Methods.
  • Updated the changelog.
  • Fixed the README.
  • Added geo example.

0.1.2 #

Third Pre-Release. Still, a long way... #

  • Implemented Chart Methods.
  • Updated the changelog.
  • Added chart example.

0.1.1 #

Second Pre-Release. Still, a long way... #

  • Implemented Artist Methods.
  • More documentation.
  • Created and modified the examples.
  • Fixed the CHANGELOG.md.
  • Fixed some objects.
  • Added ArtistSearchResults.
  • Added more Helpers.

0.1.0 #

First Pre-Release. Still, a long way... #

  • Created a solid base for request. Now it's just a copy-paste, I hope.
  • Only Album Methods implemented.
  • Fixed the methods that uses authentication in album_methods.dart.
  • Created first LastFM objects.
  • Modified the example.
  • Implemented a way to manage XML response.
  • Added some documentation.

0.0.1 #

  • Initial version. Created the Package's repo structure.
4
likes
160
points
342
downloads

Documentation

API reference

Publisher

verified publishernebulino.cloud

Weekly Downloads

A deadly simple LastFM API Wrapper for Dart. So deadly simple that it's gonna hit the mark.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

convert, crypto, dio, json_annotation, meta, xml

More

Packages that depend on scrobblenaut