X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/c00fce3ab1dc8b810a439e81e419d7b8ae1d97b9..a9f0ad12d639cdb5186f0482d2856278b41671a2:/server/rescan.c diff --git a/server/rescan.c b/server/rescan.c index 8a29300..53c566c 100644 --- a/server/rescan.c +++ b/server/rescan.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "configuration.h" #include "syscalls.h" @@ -303,6 +304,14 @@ static void do_all(void (*fn)(const struct collection *c)) { */ } +/** @brief Expire noticed.db */ +static void expire_noticed(void) { + time_t now; + + time(&now); + trackdb_expire_noticed(now - config->noticed_history * 86400); +} + int main(int argc, char **argv) { int n; struct sigaction sa; @@ -340,6 +349,8 @@ int main(int argc, char **argv) { do_all(rescan_collection); /* Check that every track still exists */ recheck_collection(0); + /* Expire noticed.db */ + expire_noticed(); } else { /* Rescan specified collections */