Added a command update to run the update check.

This commit is contained in:
2019-11-29 05:35:47 +01:00
parent 6445dc0fb8
commit 5fe66fdaef
3 changed files with 37 additions and 13 deletions

View File

@ -259,13 +259,8 @@ bool Controller::process_message(String cmd) {
if (cmd.startsWith("play ")) {
Playlist* p = pm->get_playlist_for_folder(cmd.substring(5));
player->play(p);
//} else if (cmd.equals("ls")) {
// _execute_command_ls("/");
//} else if (cmd.startsWith("ls ")) {
// _execute_command_ls(cmd.substring(3));
} else if (cmd.equals("play")) {
player->play();
} else if (cmd.equals("stop")) {
player->stop();
} else if (cmd.equals("help")) {
@ -298,6 +293,10 @@ bool Controller::process_message(String cmd) {
String folder = rest.substring(idx + 1);
pm->add_mapping(id, folder);
send_playlist_manager_status();
#ifdef OTA_UPDATE_URL
} else if (cmd.equals("update")) {
Updater::run();
#endif
} else {
ERROR("Unknown command: %s\n", cmd.c_str());
return false;