Skip to content

metaneutrons/SubSonicMedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

170 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SubSonicMedia

SubSonicMedia Logo

Build and Test Status: Pre-Release License: GPL-3.0 .NET NuGet GitHub Copilot Built with Claude

SubSonicMedia is a comprehensive .NET client library for the Subsonic API, supporting API version 1.16.1.

✨ Features

  • (mostly) full implementation of Subsonic API v1.16.1
  • Strongly-typed response models
  • Interface-based architecture for easy testing and extensibility
  • Async support throughout
  • Comprehensive documentation

🎯 Not Yet Implemented / Roadmap

These Subsonic API methods aren’t exposed yet:

  • scrobble
  • getSimilarSongs
  • getSimilarSongs2
  • getTopSongs
  • getNowPlaying
  • getShares
  • updateShare
  • deleteShare

Full implementation status is detailed in the Implementation Status document.

Getting Started

Installation

dotnet add package SubSonicMedia

Example

using System;
using SubSonicMedia;

var connection = new SubsonicConnectionInfo(
    serverUrl: "https://your-subsonic-server",
    username: "username",
    password: "password"
);
using var client = new SubsonicClient(connection);

// Ping the server
var pong = await client.PingAsync();
Console.WriteLine($"Server API version: {pong.Version}");

TestKit Integration Test

The TestKit is a console application that validates the SubSonicMedia library against a real Subsonic-compatible server:

  • Structured API tests with clear pass/fail results
  • JSON output for test results
  • JUnit XML output for integration with CI/CD systems
  • Record server responses for future mocking
  • Command-line interface for automation
  • npm-style output with UTF-8 icons
  • Detailed logging and error reporting
  1. Navigate to the TestKit directory and copy the example environment file:

    cd SubSonicMedia.TestKit
    cp .env.example .env
  2. Open .env and set your server connection info:

    SUBSONIC_SERVER_URL=https://your-subsonic-server.com
    SUBSONIC_USERNAME=your-username
    SUBSONIC_PASSWORD=your-password
    API_VERSION=1.16.1
    RECORD_TEST_RESULTS=true
    OUTPUT_DIRECTORY=./TestResults
    JUNIT_XML_OUTPUT=true
  3. Run the TestKit application:

    dotnet run
  • Use dotnet run -- --junit-xml for JUnit XML output.
  • Use dotnet run list to list available tests.
  • Use dotnet run help for full CLI options.

Documentation

Explore the full documentation on SubSonicMedia Documentation.

License

This project is licensed under the GNU General Public License v3.0 or later.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

About

.NET 8 library for SubSonic API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages