[PR #101] [MERGED] api: allow changing (not just setting) states #207

Closed
opened 2026-02-28 14:26:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/devgianlu/go-librespot/pull/101
Author: @aykevl
Created: 9/24/2024
Status: Merged
Merged: 9/27/2024
Merged by: @devgianlu

Base: masterHead: api-change-state


📝 Commits (3)

  • 46ef929 feat: support playpause endpoint that emulates the "play/pause" button
  • 54d75b8 feat: support relative volume changes in the API
  • 929d78b fix: use correct volume range (0...100) in /status

📊 Changes

4 files changed (+55 additions, -13 deletions)

View changed files

📝 api-spec.yml (+10 -1)
📝 cmd/daemon/api_server.go (+17 -6)
📝 cmd/daemon/controls.go (+7 -1)
📝 cmd/daemon/player.go (+21 -5)

📄 Description

This PR adds a play/pause command, and relative volume changes to the API. I plan to use these in Home Assistant through the RESTful Command integration.

Sadly Home Assistant doesn't support custom players yet in which case we could support whatever protocol it uses in go-librespot, so I'll just use REST commands as a poor man's media player in Home Assistant.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/devgianlu/go-librespot/pull/101 **Author:** [@aykevl](https://github.com/aykevl) **Created:** 9/24/2024 **Status:** ✅ Merged **Merged:** 9/27/2024 **Merged by:** [@devgianlu](https://github.com/devgianlu) **Base:** `master` ← **Head:** `api-change-state` --- ### 📝 Commits (3) - [`46ef929`](https://github.com/devgianlu/go-librespot/commit/46ef929dea2ce15142206cf0dd47401a2877a241) feat: support playpause endpoint that emulates the "play/pause" button - [`54d75b8`](https://github.com/devgianlu/go-librespot/commit/54d75b84225789ad51c53e8ef29f544610494280) feat: support relative volume changes in the API - [`929d78b`](https://github.com/devgianlu/go-librespot/commit/929d78b4a1ae1643c338695fa8097109a7d80ee1) fix: use correct volume range (0...100) in /status ### 📊 Changes **4 files changed** (+55 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `api-spec.yml` (+10 -1) 📝 `cmd/daemon/api_server.go` (+17 -6) 📝 `cmd/daemon/controls.go` (+7 -1) 📝 `cmd/daemon/player.go` (+21 -5) </details> ### 📄 Description This PR adds a play/pause command, and relative volume changes to the API. I plan to use these in Home Assistant through the [RESTful Command](https://www.home-assistant.io/integrations/rest_command/) integration. Sadly Home Assistant doesn't support custom players yet in which case we could support whatever protocol it uses in go-librespot, so I'll just use REST commands as a poor man's media player in Home Assistant. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:26:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#207
No description provided.