From 8e07de9d952f8f27273296f1b6ae58550ce1e98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Mon, 29 Nov 2021 19:53:34 +0300 Subject: Update adjacent images to inserted/removed Now the program checks if the html of the next and previous images was updated if a new image was inserted or an old image removed, and updates them if needed. Also make rmextra and filesync respect dry run mode. --- include/components.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/components.h') diff --git a/include/components.h b/include/components.h index e65a66a..9e568ee 100644 --- a/include/components.h +++ b/include/components.h @@ -40,9 +40,11 @@ struct image { struct hashmap *map; /* Hashmap with values to be passed to thumbs and previews vectors */ struct hashmap *thumb; + bool modified; }; struct album { + struct site *site; struct album_config *config; /* The path to the source directory */ char *source; @@ -69,11 +71,13 @@ struct album { struct image *image_new(char *src, const struct stat *, struct album *); +struct image *image_old(struct stat *istat); + int image_cmp(const void *a, const void *b); void image_destroy(void *data); -struct album *album_new(struct album_config *, struct site_config *, +struct album *album_new(struct album_config *, struct site *, const char *src, const char *rsrc, const struct stat *); int album_cmp(const void *a, const void *b); -- cgit v1.2.3