Removed sending unnecessary data on the .../playback/next and .../previous endpoint
This commit is contained in:
@@ -84,10 +84,8 @@ void api_v1_playback_pause() {
|
|||||||
void api_v1_playback_next() {
|
void api_v1_playback_next() {
|
||||||
Serial.println("[HTTP] [API] 200 - GET '/api/v1/playback/next'");
|
Serial.println("[HTTP] [API] 200 - GET '/api/v1/playback/next'");
|
||||||
|
|
||||||
String songPath = nextAudio();
|
nextAudio();
|
||||||
String content = "\"resource_path\": \"";
|
String content = "\"resource_playlist_index\": ";
|
||||||
content += songPath;
|
|
||||||
content += "\", \"resource_playlist_index\": ";
|
|
||||||
content += String(currentPlaylistPosition);
|
content += String(currentPlaylistPosition);
|
||||||
|
|
||||||
|
|
||||||
@@ -97,10 +95,8 @@ void api_v1_playback_next() {
|
|||||||
void api_v1_playback_previous() {
|
void api_v1_playback_previous() {
|
||||||
Serial.println("[HTTP] [API] 200 - GET '/api/v1/playback/previous'");
|
Serial.println("[HTTP] [API] 200 - GET '/api/v1/playback/previous'");
|
||||||
|
|
||||||
String songPath = previousAudio();
|
previousAudio();
|
||||||
String content = "\"resource_path\": \"";
|
String content = "\"resource_playlist_index\": ";
|
||||||
content += songPath;
|
|
||||||
content += "\", \"resource_playlist_index\": ";
|
|
||||||
content += String(currentPlaylistPosition);
|
content += String(currentPlaylistPosition);
|
||||||
|
|
||||||
api_server.send(200, "application/json", generate_api_json(true, content));
|
api_server.send(200, "application/json", generate_api_json(true, content));
|
||||||
|
Reference in New Issue
Block a user