From 043b540dfdac0a2070fd816d82697389d9e44700 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 14 Jul 2022 14:40:38 +0200 Subject: WIP --- src/c_mpdview.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/c_mpdview.c b/src/c_mpdview.c index eea0f8c..9456e7b 100644 --- a/src/c_mpdview.c +++ b/src/c_mpdview.c @@ -45,6 +45,7 @@ * This is the entrypoint of the program. */ +#include #include #include @@ -177,8 +178,9 @@ main char* const argv[]) { struct mpdview_s* view; - bool_t verbose; char c; + bool_t doexit; + bool_t verbose; verbose = FALSE; while ((c = getopt(argc, argv, OPTSTRING)) != -1) { @@ -203,6 +205,12 @@ main if (view == NULL) { return (EXIT_FAILURE); } + doexit = FALSE; + while ( + doexit == FALSE && + mpd_run_idle_mask(view->conn, MPD_IDLE_PLAYER) != 0 + ) { + } c_get_music_dir(view); if (c_connect_mpd(view) != RET_OK) { c_destroy_mpdview(&view); -- cgit v1.2.3