file_data_register_notify_func(thumb_notify_cb, NULL, NOTIFY_PRIORITY_HIGH);
file_data_register_notify_func(histogram_notify_cb, NULL, NOTIFY_PRIORITY_HIGH);
file_data_register_notify_func(collect_manager_notify_cb, NULL, NOTIFY_PRIORITY_LOW);
+ file_data_register_notify_func(metadata_notify_cb, NULL, NOTIFY_PRIORITY_LOW);
+
gtkrc_load();
return ret;
}
+void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data)
+{
+ if ((type & (NOTIFY_REREAD | NOTIFY_CHANGE)) && g_list_find(metadata_write_queue, fd))
+ {
+ DEBUG_1("Notify metadata: %s %04x", fd->path, type);
+ if (!isname(fd->path))
+ {
+ /* ignore deleted files */
+ metadata_write_queue_remove(fd);
+ }
+ }
+}
gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc done_func, gpointer done_data)
{
FileData *fd = work->data;
work = work->next;
+ if (!isname(fd->path))
+ {
+ /* ignore deleted files */
+ metadata_write_queue_remove(fd);
+ continue;
+ }
+
if (fd->change) continue; /* another operation in progress, skip this file for now */
to_approve = g_list_prepend(to_approve, file_data_ref(fd));
gboolean metadata_write_queue_remove_list(GList *list);
gboolean metadata_write_perform(FileData *fd);
gboolean metadata_write_queue_confirm(gboolean force_dialog, FileUtilDoneFunc done_func, gpointer done_data);
+void metadata_notify_cb(FileData *fd, NotifyType type, gpointer data);
gint metadata_queue_length(void);