mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Adds a per-library option to skip hidden files and directories during scans
This commit is contained in:
1 parent
0bb795dca5
commit
0e8d61b215
67 files changed
+4624
-19
No files matched your search
+10
-2
@@ -25,8 +25,15 @@ public class LibraryDtoFixture
|
||||
/// <param name="libraryType">Optional type of the library.</param>
|
||||
/// <param name="isEnabled">Whether the media library is enabled or not.</param>
|
||||
/// <param name="contentLocations">Optional collection of directories that contain the library files.</param>
|
||||
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Optional. Whether hidden files and directories should be skipped during the scan, or not.</param>
|
||||
/// <returns>A configured <see cref="LibraryDto"/> instance.</returns>
|
||||
public LibraryDto Create(Guid? id = null, string? title = null, string? libraryType = null, bool? isEnabled = null, List<string>? contentLocations = null)
|
||||
public LibraryDto Create(
|
||||
Guid? id = null,
|
||||
string? title = null,
|
||||
string? libraryType = null,
|
||||
bool? isEnabled = null,
|
||||
List<string>? contentLocations = null,
|
||||
bool? shouldSkipHiddenFilesAndDirectoriesDuringScan = null)
|
||||
{
|
||||
return new LibraryDto
|
||||
{
|
||||
@@ -35,7 +42,8 @@ public class LibraryDtoFixture
|
||||
LibraryType = libraryType ?? _faker.PickRandom("Book", "Video", "Photo"),
|
||||
CoverImage = _faker.Image.PicsumUrl(),
|
||||
ContentLocations = contentLocations ?? [_faker.System.DirectoryPath()],
|
||||
IsEnabled = isEnabled ?? _faker.Random.Bool()
|
||||
IsEnabled = isEnabled ?? _faker.Random.Bool(),
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan = shouldSkipHiddenFilesAndDirectoriesDuringScan ?? _faker.Random.Bool()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user