mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-17 09:30:00 -04:00
Excempt Spotify items from rescan purge
This commit is contained in:
parent
851b57017d
commit
a7d0a603b3
@ -710,10 +710,7 @@ process_file(char *file, time_t mtime, off_t size, int type, int flags)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_SCAN, "Forcing startup rescan, found init-rescan file: %s\n", file);
|
DPRINTF(E_LOG, L_SCAN, "Forcing startup rescan, found init-rescan file: %s\n", file);
|
||||||
inofd_event_unset(); // Clears all inotify watches
|
bulk_scan(F_SCAN_BULK | F_SCAN_RESCAN);
|
||||||
|
|
||||||
inofd_event_set();
|
|
||||||
bulk_scan(F_SCAN_BULK);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1027,6 +1024,13 @@ bulk_scan(int flags)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Protect spotify from the imminent purge if rescanning */
|
||||||
|
if (flags & F_SCAN_RESCAN)
|
||||||
|
{
|
||||||
|
db_file_ping_bymatch("spotify:");
|
||||||
|
db_pl_ping_bymatch("spotify:");
|
||||||
|
}
|
||||||
|
|
||||||
DPRINTF(E_DBG, L_SCAN, "Purging old database content\n");
|
DPRINTF(E_DBG, L_SCAN, "Purging old database content\n");
|
||||||
db_purge_cruft(start);
|
db_purge_cruft(start);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user