diff options
Diffstat (limited to 'src/app_console/app_console.cpp')
| -rw-r--r-- | src/app_console/app_console.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/app_console/app_console.cpp b/src/app_console/app_console.cpp index 0483bde9..457d66f6 100644 --- a/src/app_console/app_console.cpp +++ b/src/app_console/app_console.cpp @@ -121,8 +121,8 @@ void RegisterDbInit() { esp_console_cmd_register(&cmd); } -int CmdDbSongs(int argc, char** argv) { - static const std::string usage = "usage: db_songs"; +int CmdDbTracks(int argc, char** argv) { + static const std::string usage = "usage: db_tracks"; if (argc != 1) { std::cout << usage << std::endl; return 1; @@ -133,9 +133,10 @@ int CmdDbSongs(int argc, char** argv) { std::cout << "no database open" << std::endl; return 1; } - std::unique_ptr<database::Result<database::Song>> res(db->GetSongs(5).get()); + std::unique_ptr<database::Result<database::Track>> res( + db->GetTracks(5).get()); while (true) { - for (database::Song s : res->values()) { + for (database::Track s : res->values()) { std::cout << s.tags().title.value_or("[BLANK]") << std::endl; } if (res->next_page()) { @@ -149,11 +150,11 @@ int CmdDbSongs(int argc, char** argv) { return 0; } -void RegisterDbSongs() { - esp_console_cmd_t cmd{.command = "db_songs", - .help = "lists titles of ALL songs in the database", +void RegisterDbTracks() { + esp_console_cmd_t cmd{.command = "db_tracks", + .help = "lists titles of ALL tracks in the database", .hint = NULL, - .func = &CmdDbSongs, + .func = &CmdDbTracks, .argtable = NULL}; esp_console_cmd_register(&cmd); } @@ -217,7 +218,7 @@ auto AppConsole::RegisterExtraComponents() -> void { RegisterAudioStatus(); */ RegisterDbInit(); - RegisterDbSongs(); + RegisterDbTracks(); RegisterDbDump(); } |
