]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Update status items on blob events.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Apr 2017 19:13:59 +0000 (21:13 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Jun 2017 17:08:58 +0000 (19:08 +0200)
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

diff --git a/aft.c b/aft.c
index 4a8124481b551b71c584a9483400420f270949d0..4ed703ec0df094e8f3dd6ca7668de77b8bc27c0b 100644 (file)
--- 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;
        }