aboutsummaryrefslogtreecommitdiff
path: root/include/components.h
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-29 19:53:34 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-29 19:53:34 +0300
commit8e07de9d952f8f27273296f1b6ae58550ce1e98b (patch)
treec653d6d2b4a2e2251ce0ff44ad4740d91e20b1da /include/components.h
parentef0a23b0636a8c7f4a3c802ff76645261e8b225f (diff)
downloadrevela-8e07de9d952f8f27273296f1b6ae58550ce1e98b.tar.gz
revela-8e07de9d952f8f27273296f1b6ae58550ce1e98b.zip
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.
Diffstat (limited to 'include/components.h')
-rw-r--r--include/components.h6
1 files changed, 5 insertions, 1 deletions
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);