Skip to content

Commit 1c2c6dc

Browse files
committed
Subsonic API: return error for unimplemented endpoints
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.
1 parent 30b1143 commit 1c2c6dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Controller/SubsonicController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,15 +997,15 @@ protected function deleteBookmark(string $id) {
997997
*/
998998
protected function getPlayQueue() {
999999
// TODO: not supported yet
1000-
return $this->subsonicResponse(['playQueue' => []]);
1000+
return $this->subsonicErrorResponse(30, 'Not implemented');
10011001
}
10021002

10031003
/**
10041004
* @SubsonicAPI
10051005
*/
10061006
protected function savePlayQueue() {
10071007
// TODO: not supported yet
1008-
return $this->subsonicResponse([]);
1008+
return $this->subsonicErrorResponse(30, 'Not implemented');
10091009
}
10101010

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

10291029
/* -------------------------------------------------------------------------

0 commit comments

Comments
 (0)