Folder Watching (#1467)
* Hooked in a server setting to enable/disable folder watching * Validated the file rename change event * Validated delete file works * Tweaked some logic to determine if a change occurs on a folder or a file. * Added a note for an upcoming branch * Some minor changes in the loop that just shift where code runs. * Implemented ScanFolder api * Ensure we restart watchers when we modify a library folder. * Fixed a unit test
This commit is contained in:
parent
87ad5844f0
commit
037a1a5a8c
19 changed files with 269 additions and 102 deletions
|
@ -19,6 +19,7 @@ public interface ITaskScheduler
|
|||
Task ScheduleTasks();
|
||||
Task ScheduleStatsTasks();
|
||||
void ScheduleUpdaterTasks();
|
||||
void ScanFolder(string folderPath);
|
||||
void ScanLibrary(int libraryId, bool force = false);
|
||||
void CleanupChapters(int[] chapterIds);
|
||||
void RefreshMetadata(int libraryId, bool forceUpdate = true);
|
||||
|
@ -161,6 +162,12 @@ public class TaskScheduler : ITaskScheduler
|
|||
// Schedule update check between noon and 6pm local time
|
||||
RecurringJob.AddOrUpdate("check-updates", () => CheckForUpdate(), Cron.Daily(Rnd.Next(12, 18)), TimeZoneInfo.Local);
|
||||
}
|
||||
|
||||
public void ScanFolder(string folderPath)
|
||||
{
|
||||
_scannerService.ScanFolder(Parser.Parser.NormalizePath(folderPath));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void ScanLibraries()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue