Skip to content

Releases: harperreed/MusicAssistantKit

v0.3.0: Media Item Event Support

Choose a tag to compare

@harperreed harperreed released this 23 Oct 19:43
c2de52a

✨ Features

Typed Media Item Event Support

  • Added MediaItemEvent type with strongly-typed fields:
    • action: .added, .updated, .deleted, or .played
    • itemId: Optional item identifier
    • mediaType: .track, .album, .artist, .playlist, or .unknown
    • data: Full event data dictionary
  • New mediaItemUpdates publisher on EventPublisher
  • Comprehensive test coverage for all media item event scenarios

🐛 Fixes

  • Resolved SwiftFormat numeric literal formatting issues
  • Refactored EventPublisher.publish() to meet SwiftLint function length requirements
  • Improved code organization with dedicated event routing methods

📝 Changes

  • Extracted event routing logic into private helper methods for better maintainability
  • All CI checks passing (SwiftFormat, SwiftLint, 76 unit tests)

🔗 Full Changelog

v0.2.1...v0.3.0


🤖 Generated with Claude Code

v0.2.1

Choose a tag to compare

@harperreed harperreed released this 22 Oct 20:50

Fixed

  • Resolved SwiftLint CI failures for code quality compliance
  • Resolved SwiftFormat CI failures for consistent code formatting

MusicAssistantKit 0.0.1

Choose a tag to compare

@harperreed harperreed released this 11 Oct 04:38

MusicAssistantKit 0.0.1

Initial release of MusicAssistantKit - Swift package for Music Assistant API integration.

Features

  • WebSocket-based client for Music Assistant server
  • Protocol-based dependency injection for testability
  • Comprehensive unit test coverage (76 tests, ~97% coverage)
  • Integration test support for real server validation
  • Swift 6 concurrency compliance

Player Control

  • Play, pause, stop commands
  • Player state management

Queue Management

  • Get queue state
  • Clear, shuffle, repeat controls
  • Media playback

Event Streaming

  • Combine-based event publishers
  • Player update events
  • Queue update events

Installation

Add to your Package.swift:

```swift
dependencies: [
.package(url: "https://github.com/harperreed/MusicAssistantKit", from: "0.0.1")
]
```

Testing

Unit tests (fast, no server needed):
```bash
SKIP_INTEGRATION_TESTS=1 swift test
```

Integration tests (requires Music Assistant server):
```bash
MA_TEST_HOST=localhost MA_TEST_PORT=8095 swift test
```

See CLAUDE.md for complete testing documentation.

Documentation