(Open)Subsonic API Wrapper For Dart
opensubsonic_api.dart is a wrapper for the Subsonic API in Dart, with additional support for OpenSubsonic.
Goals
This package focuses on music only; podcasts and videos have the lowest priority.
Usage
Installation
TODO
Define SubsonicApi
final client = SubsonicApi(
baseUrl: 'https://example.com', // or 'http://localhost:3000'
auth: const SubsonicAuthModel(
username: 'admin', // or any other username you use
password: 'admin', // or your password
),
debug: true,
);
final result = await client.api.getArtists();
print(result);
Note:
debugis used to pass the password directly to the server, and it should be used for testing purposes only.The password can be either in clear text or hex-encoded with an "enc:" prefix. Since version 1.13.0, this should only be used for testing purposes.
When
debugis set tofalse, the password will be hashed asmd5(salt + password), wheresaltis a random string generated by the API server.See the API documentation for more information.