From a7a8d30e55563dd18fafecc9af710f6c37393016 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 17 Apr 2017 21:13:59 +0200 Subject: [PATCH] Update status items on blob events. If the image or the lyrics blob for the current audio file changes, e.g. because the user executed the mvimg command, para_gui still reports the old value because blob events don't trigger a status item update. This patch teaches aft_event_handler() to honor such events. We keep it simple and update the items on every add/remove/rename event. --- aft.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aft.c b/aft.c index 4a812448..4ed703ec 100644 --- a/aft.c +++ b/aft.c @@ -2558,6 +2558,16 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb, return ret; make_status_items(); return 1; + } + case BLOB_RENAME: + case BLOB_REMOVE: + case BLOB_ADD: { + /* + * These events are rare. We don't bother to check whether the + * current status items are affected and simply recreate them + * every time. + */ + make_status_items(); } default: return 0; } -- 2.39.2