diff options
author | Joe <bousset.rudy@gmail.com> | 2022-07-14 14:40:38 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-07-14 14:40:38 +0200 |
commit | 043b540dfdac0a2070fd816d82697389d9e44700 (patch) | |
tree | ac3af426d331059d7e4d41dcbd168e22a08b117d | |
parent | fix (diff) | |
download | mpdview-043b540dfdac0a2070fd816d82697389d9e44700.tar.gz mpdview-043b540dfdac0a2070fd816d82697389d9e44700.tar.bz2 mpdview-043b540dfdac0a2070fd816d82697389d9e44700.tar.xz mpdview-043b540dfdac0a2070fd816d82697389d9e44700.tar.zst mpdview-043b540dfdac0a2070fd816d82697389d9e44700.zip |
WIP
-rw-r--r-- | src/c_mpdview.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 <mpd/idle.h> #include <sys/param.h> #include <sys/syslimits.h> @@ -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); |