From fe51796842a97ffb7765f449423a310d271587a0 Mon Sep 17 00:00:00 2001 From: janbar Date: Thu, 23 Jul 2020 22:19:05 +0200 Subject: [PATCH] cli: add command refreshShareIndex --- backend/cli/noson.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/cli/noson.cpp b/backend/cli/noson.cpp index d9b1f7b1..b5450942 100644 --- a/backend/cli/noson.cpp +++ b/backend/cli/noson.cpp @@ -276,6 +276,7 @@ static bool parseCommand(const std::string& line) PRINT(" 2:Type ROOM,STARTTIME,RECURRENCE,DURATION,VOLUME,PROGRAM\n"); PRINT(" 3:New value\n"); PRINT(" Program 0 for Buzzer or the index of favorite (see SHOWFV)\n"); + PRINT("REFRESHSHAREINDEX Update the music index on Sonos\n"); PRINT("HELP Print this help\n"); PRINT("\n"); } @@ -786,6 +787,13 @@ static bool parseCommand(const std::string& line) else PERROR("Error: Missing arguments.\n"); } + else if (token == "REFRESHSHAREINDEX") + { + if (gSonos->RefreshShareIndex()) + PERROR("Succeeded\n"); + else + PERROR("Failed\n"); + } else { PERROR("Error: Command invalid.\n");