mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 14:09:51 -05:00
Purge old files and playlists after bulk scan
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -608,9 +609,12 @@ bulk_scan(void)
|
||||
int nlib;
|
||||
int ndirs;
|
||||
char *path;
|
||||
time_t start;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
start = time(NULL);
|
||||
|
||||
playlists = NULL;
|
||||
dirstack = NULL;
|
||||
|
||||
@@ -638,6 +642,9 @@ bulk_scan(void)
|
||||
|
||||
if (dirstack)
|
||||
DPRINTF(E_LOG, L_SCAN, "WARNING: unhandled leftover directories\n");
|
||||
|
||||
DPRINTF(E_DBG, L_SCAN, "Purging old database content\n");
|
||||
db_purge_cruft(start);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user