Skip to content

Commit

Permalink
Subsonic API: return error for unimplemented endpoints
Browse files Browse the repository at this point in the history
While the format of getPlayQueue was wrong, had it been right, simply
returning an empty queue would have caused clients with support for
queue syncing to silently empty their play queue.
  • Loading branch information
jplitza committed Oct 13, 2023
1 parent 30b1143 commit 1c2c6dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Controller/SubsonicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -997,15 +997,15 @@ protected function deleteBookmark(string $id) {
*/
protected function getPlayQueue() {
// TODO: not supported yet
return $this->subsonicResponse(['playQueue' => []]);
return $this->subsonicErrorResponse(30, 'Not implemented');
}

/**
* @SubsonicAPI
*/
protected function savePlayQueue() {
// TODO: not supported yet
return $this->subsonicResponse([]);
return $this->subsonicErrorResponse(30, 'Not implemented');
}

/**
Expand All @@ -1023,7 +1023,7 @@ protected function getScanStatus() {
*/
protected function getNowPlaying() {
// TODO: not supported yet
return $this->subsonicResponse(['nowPlaying' => ['entry' => []]]);
return $this->subsonicErrorResponse(30, 'Not implemented');
}

/* -------------------------------------------------------------------------
Expand Down

0 comments on commit 1c2c6dc

Please sign in to comment.