mirror of
https://github.com/Readarr/Readarr
synced 2026-01-23 07:51:27 +01:00
Fixed: DiskScanService.cs Scan() function now utilizes the 'authorIds' variable in the function call
When a list of authorIds is passed into the DiskScanService 'Scan' function, the current code disregards the authorIds array that's passed in and scans the entire folder structure unnecessarily. When new authors are added, it should only scan their folders, not the entire root again as it takes a significant amount of time for large libraries and prevents us from being able to do Part 2 of this change coming next... Part 2, if we correct this step will then enable us to create the missing Authors folder, resulting in a 'fixed' user interface option 'Create empty Author folders' (this currently does nothing). All these changes were in the DiskScanService.cs file alone. Updated the "public void Scan()" function so it respects the 'Author' variable being passed in and populates the folder array correctly. This is required to enable commit ## to fix the 'Create Empty Author Folders' functionality.
This commit is contained in:
parent
2bde9d13dd
commit
8eebce5171
1 changed files with 13 additions and 0 deletions
|
|
@ -89,6 +89,19 @@ public void Scan(List<string> folders = null, FilterFilesType filter = FilterFil
|
|||
{
|
||||
authorIds = new List<int>();
|
||||
}
|
||||
else
|
||||
{
|
||||
folders = new List<string>();
|
||||
foreach (var authorId in authorIds)
|
||||
{
|
||||
var author = _authorService.GetAuthor(authorId);
|
||||
|
||||
if (author != null)
|
||||
{
|
||||
folders.Add(author.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var mediaFileList = new List<IFileInfo>();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue