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() {
|
||||
Serial.println("[HTTP] [API] 200 - GET '/api/v1/playback/next'");
|
||||
|
||||
String songPath = nextAudio();
|
||||
String content = "\"resource_path\": \"";
|
||||
content += songPath;
|
||||
content += "\", \"resource_playlist_index\": ";
|
||||
nextAudio();
|
||||
String content = "\"resource_playlist_index\": ";
|
||||
content += String(currentPlaylistPosition);
|
||||
|
||||
|
||||
@@ -97,10 +95,8 @@ void api_v1_playback_next() {
|
||||
void api_v1_playback_previous() {
|
||||
Serial.println("[HTTP] [API] 200 - GET '/api/v1/playback/previous'");
|
||||
|
||||
String songPath = previousAudio();
|
||||
String content = "\"resource_path\": \"";
|
||||
content += songPath;
|
||||
content += "\", \"resource_playlist_index\": ";
|
||||
previousAudio();
|
||||
String content = "\"resource_playlist_index\": ";
|
||||
content += String(currentPlaylistPosition);
|
||||
|
||||
api_server.send(200, "application/json", generate_api_json(true, content));
|
||||
|
Reference in New Issue
Block a user