mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-29 23:46:01 -05:00
[filescanner] Trigger library-scan on .init-rescan / .full-rescan
This commit is contained in:
parent
510d38c059
commit
8ee3ef5b15
@ -483,7 +483,7 @@ process_file(char *file, time_t mtime, off_t size, int type, int flags, int dir_
|
|||||||
|
|
||||||
DPRINTF(E_LOG, L_SCAN, "Startup rescan triggered, found init-rescan file: %s\n", file);
|
DPRINTF(E_LOG, L_SCAN, "Startup rescan triggered, found init-rescan file: %s\n", file);
|
||||||
|
|
||||||
filescanner_rescan();
|
library_rescan();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FILE_CTRL_FULLSCAN:
|
case FILE_CTRL_FULLSCAN:
|
||||||
@ -492,7 +492,7 @@ process_file(char *file, time_t mtime, off_t size, int type, int flags, int dir_
|
|||||||
|
|
||||||
DPRINTF(E_LOG, L_SCAN, "Full rescan triggered, found full-rescan file: %s\n", file);
|
DPRINTF(E_LOG, L_SCAN, "Full rescan triggered, found full-rescan file: %s\n", file);
|
||||||
|
|
||||||
filescanner_fullrescan();
|
library_fullrescan();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1470,7 +1470,6 @@ filescanner_rescan()
|
|||||||
|
|
||||||
inofd_event_unset(); // Clears all inotify watches
|
inofd_event_unset(); // Clears all inotify watches
|
||||||
db_watch_clear();
|
db_watch_clear();
|
||||||
|
|
||||||
inofd_event_set();
|
inofd_event_set();
|
||||||
bulk_scan(F_SCAN_BULK | F_SCAN_RESCAN);
|
bulk_scan(F_SCAN_BULK | F_SCAN_RESCAN);
|
||||||
|
|
||||||
@ -1483,8 +1482,8 @@ filescanner_fullrescan()
|
|||||||
DPRINTF(E_LOG, L_SCAN, "Full rescan triggered\n");
|
DPRINTF(E_LOG, L_SCAN, "Full rescan triggered\n");
|
||||||
|
|
||||||
inofd_event_unset(); // Clears all inotify watches
|
inofd_event_unset(); // Clears all inotify watches
|
||||||
bulk_scan(F_SCAN_BULK);
|
|
||||||
inofd_event_set();
|
inofd_event_set();
|
||||||
|
bulk_scan(F_SCAN_BULK);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user