diff options
author | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-18 14:32:19 +0100 |
---|---|---|
committer | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-18 14:34:42 +0100 |
commit | c51b27d401b2e6b1b86989c7823c2dda6f14d26f (patch) | |
tree | 05f29d3b0204d203b9229d52d9101c579a3b9747 | |
parent | f266b2a5d4d5205a8954525ef23871cf2d70a291 (diff) |
Do not loop after sending a database update command to Mopidy
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/mpdpp.cpp | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ca0893a..294dd870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ * Support gstreamer's udpsink as a data source for visualization (Mopidy). * Deprecate `visualizer_fifo_path` in favor of `visualizer_data_source`. * Don't run volume changing actions if there is no mixer. +* Do not loop after sending a database update command to Mopidy. # ncmpcpp-0.8.2 (2018-04-11) * Help screen: fixed display of EoF keycode diff --git a/src/mpdpp.cpp b/src/mpdpp.cpp index c79bbe6d..f09fe869 100644 --- a/src/mpdpp.cpp +++ b/src/mpdpp.cpp @@ -214,7 +214,11 @@ Status Connection::getStatus() void Connection::UpdateDirectory(const std::string &path) { prechecksNoCommandsList(); - mpd_run_update(m_connection.get(), path.c_str()); + // Use update as mpd_run_update doesn't call mpd_response_finish if the id + // returned from mpd_recv_update_id is 0 which breaks mopidy. + mpd_send_update(m_connection.get(), path.c_str()); + mpd_recv_update_id(m_connection.get()); + mpd_response_finish(m_connection.get()); checkErrors(); } |