server: Update status items on file renames.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Apr 2018 19:05:56 +0000 (21:05 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 May 2018 08:45:39 +0000 (10:45 +0200)
The audio file table currently ignores rename events. This has the
effect that the status items, hence the display of para_gui, is not
updated when the current file has been renamed. Fix this oversight.

aft.c

diff --git a/aft.c b/aft.c
index 8969e7a..2f97297 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2563,6 +2563,16 @@ static int aft_event_handler(enum afs_events event, struct para_buffer *pb,
                status_item_ls_data.afsi.last_played = old_last_played;
                make_status_items();
                return 1;
+       } case AUDIO_FILE_RENAME: {
+               char *path;
+               if (data != current_aft_row)
+                       return 0;
+               ret = get_audio_file_path_of_row(current_aft_row, &path);
+               if (ret < 0)
+                       return ret;
+               status_item_ls_data.path = path;
+               make_status_items();
+               return 1;
        } case AFHI_CHANGE: {
                if (data != current_aft_row)
                        return 0;