summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8a189e)
raw | patch | inline | side by side (parent: c8a189e)
author | Max Kellermann <max@duempel.org> | |
Fri, 12 Jun 2009 17:40:08 +0000 (19:40 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 12 Jun 2009 17:40:08 +0000 (19:40 +0200) |
The mpdclient library should care about setting the new (temporary)
MPD update status.
MPD update status.
src/mpdclient.c | patch | blob | history | |
src/screen_file.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 9aab2fc39b99a3e7d5fafdfeee52f3a3f9ffc2d0..cc391ab1a41a745334ca0cb1c44d320f660d4546 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
gint
mpdclient_cmd_db_update(mpdclient_t *c, gchar *path)
{
+ gint ret;
+
mpd_sendUpdateCommand(c->connection, path ? path : "");
- return mpdclient_finish_command(c);
+ ret = mpdclient_finish_command(c);
+
+ if (ret == 0)
+ /* set updatingDb to make sure the browse callback
+ gets called even if the update has finished before
+ status is updated */
+ c->status->updatingDb = 1;
+
+ return ret;
}
gint
diff --git a/src/screen_file.c b/src/screen_file.c
index fdb8a5ae6b2f6f5177e6f974ba8f66bc54ac1dc4..a149e9131791fd82ae6bafdf30b9ad3fbb75936e 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
g_free(path_locale);
} else
screen_status_printf(_("Database update started"));
-
- /* set updatingDb to make sure the browse callback gets called
- * even if the updated has finished before status is updated */
- c->status->updatingDb = 1;
}
} else
screen_status_printf(_("Database update running..."));