{"id":47604972,"url":"https://github.com/zt64/subsonic-kotlin","last_synced_at":"2026-04-01T19:08:13.129Z","repository":{"id":343151632,"uuid":"1154162181","full_name":"zt64/subsonic-kotlin","owner":"zt64","description":"Subsonic library for Kotlin Multiplatform","archived":false,"fork":false,"pushed_at":"2026-03-17T05:54:48.000Z","size":199,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-17T20:34:06.305Z","etag":null,"topics":["kotlin","subsonic"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zt64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-10T04:35:34.000Z","updated_at":"2026-03-17T05:54:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zt64/subsonic-kotlin","commit_stats":null,"previous_names":["zt64/subsonic-kotlin"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/zt64/subsonic-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt64%2Fsubsonic-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt64%2Fsubsonic-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt64%2Fsubsonic-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt64%2Fsubsonic-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zt64","download_url":"https://codeload.github.com/zt64/subsonic-kotlin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zt64%2Fsubsonic-kotlin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin","subsonic"],"created_at":"2026-04-01T19:08:12.400Z","updated_at":"2026-04-01T19:08:13.118Z","avatar_url":"https://github.com/zt64.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# subsonic-kotlin\n\n[![Maven Central](https://img.shields.io/maven-central/v/dev.zt64.subsonic/subsonic-client)](https://central.sonatype.com/artifact/dev.zt64.subsonic/subsonic-client)\n[![License](https://img.shields.io/github/license/zt64/subsonic-kotlin)](LICENSE)\n\n![badge-platform-jvm]\n![badge-platform-android]\n![badge-platform-linux]\n![badge-platform-windows]\n![badge-platform-macos]\n![badge-platform-ios]\n![badge-platform-tvos]\n![badge-platform-watchos]\n![badge-platform-js]\n![badge-platform-wasm]\n\nA Kotlin Multiplatform client library for the Subsonic API.\n\n## Features\n\n- Full [OpenSubsonic](https://opensubsonic.netlify.app/) API coverage (based on API version 1.16.1)\n- Kotlin Multiplatform support (JVM, Android, Linux, Windows, macOS, iOS, tvOS, watchOS, JS, Wasm)\n- Token-based and API key authentication\n- Built on [Ktor](https://ktor.io/) with [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization)\n\n## Setup\n\nAdd the following to your `gradle/libs.versions.toml`:\n\n```toml\n[versions]\nsubsonicKotlin = \"x.y.z\"  # Replace with latest version\n\n[libraries]\nsubsonicClient = { module = \"dev.zt64.subsonic:subsonic-client\", version.ref = \"subsonicKotlin\" }\n```\n\nThen add the dependency to your module's `build.gradle.kts`:\n\n```kotlin\ndependencies {\n    implementation(libs.subsonicClient)\n}\n```\n\n\u003e [!NOTE]\n\u003e A Ktor engine implementation must be included in your dependencies for the client to function.\n\n## Quick Start\n\n### Creating a Client\n\n```kotlin\n// Using a username and password\nval client = SubsonicClient(\n    baseUrl = \"https://your-server.com\",\n    auth = SubsonicAuth.Token(\n        username = \"your-username\",\n        password = \"your-password\"\n    )\n)\n\n// Using an API key (not universally supported, check your servers compatible authentication)\nval client = SubsonicClient(\n    baseUrl = \"https://your-server.com\",\n    auth = SubsonicAuth.Key(apiKey = \"your-api-key\")\n)\n```\n\n### Basic Usage\n\n```kotlin\n// Test connectivity\nclient.ping()\n\n// Browse library\nval artists = client.getArtists()\nval artist = client.getArtist(id = \"123\")\nval album = client.getAlbum(id = \"456\")\n\n// Search\nval results = client.searchID3(query = \"Beatles\")\n\n// Playlists\nval playlists = client.getPlaylists()\nval newPlaylist = client.createPlaylist(name = \"My Mix\", songIds = listOf(\"1\", \"2\", \"3\"))\n\n// Streaming\nval streamUrl = client.getStreamUrl(id = \"song-123\", maxBitRate = 320)\nval coverArtUrl = client.getCoverArtUrl(id = album.coverArt, size = \"500\")\n\n// Star/Rate\nclient.star(\"song-123\")\nclient.setRating(id = \"song-123\", rating = 5)\n\n// Scrobble\nclient.scrobble(id = \"song-123\")\n```\n\n## Error Handling\n\n```kotlin\ntry {\n    val album = client.getAlbum(id = \"invalid-id\")\n} catch (e: SubsonicException) {\n    println(\"${e.code}: ${e.message}\")\n}\n```\n\n## Advanced Configuration\n\n```kotlin\n// Use a specific Ktor engine\nval client = SubsonicClient(\n    baseUrl = \"https://your-server.com\",\n    auth = SubsonicAuth.Token(username = \"user\", password = \"pass\")\n) {\n    // Additional Ktor client configuration\n    install(HttpTimeout) {\n        requestTimeoutMillis = 30000\n    }\n}\n```\n\n## API Compatibility\n\nThis library targets Subsonic API version **1.16.1** and supports the Open Subsonic specification. It has been tested with:\n\n- [Navidrome](https://www.navidrome.org/)\n\nMost endpoints should work with any Subsonic-compatible server, though some features may vary by implementation.\n\n## Contributing\n\nContributions are welcome and encouraged! Please feel free to submit issues or pull requests.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n[badge-platform-jvm]: https://img.shields.io/badge/-jvm-DB413D.svg?style=flat\n[badge-platform-android]: https://img.shields.io/badge/-android-3DDC84.svg?style=flat\n[badge-platform-linux]: https://img.shields.io/badge/-linux-2D3F6C.svg?style=flat\n[badge-platform-windows]: https://img.shields.io/badge/-windows-4D76CD.svg?style=flat\n[badge-platform-macos]: https://img.shields.io/badge/-macos-111111.svg?style=flat\n[badge-platform-ios]: https://img.shields.io/badge/-ios-CDCDCD.svg?style=flat\n[badge-platform-tvos]: https://img.shields.io/badge/-tvos-808080.svg?style=flat\n[badge-platform-watchos]: https://img.shields.io/badge/-watchos-C0C0C0.svg?style=flat\n[badge-platform-js]: https://img.shields.io/badge/-js-F8DB5D.svg?style=flat\n[badge-platform-wasm]: https://img.shields.io/badge/-wasm-624FE8.svg?style=flat","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzt64%2Fsubsonic-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzt64%2Fsubsonic-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzt64%2Fsubsonic-kotlin/lists"}