Adds a per-library option to skip hidden files and directories during scans

This commit is contained in:
BinaryAlley committed 2026-11-27 09:52:40 +02:00
1 parent 0bb795dca5
commit 0e8d61b215
67 files changed
+4624 -19

No files matched your search

@@ -33,6 +33,7 @@ public class LibraryEntityFixture
/// <param name="canDownloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="shouldSaveMetadataInMediaDirectories">Whether the metadata should be saved in the media directories or not.</param>
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether unchanged directories should be skipped during a scan or not.</param>
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Whether hidden files and directories should be skipped during a scan or not.</param>
/// <param name="isContentOnSsd">Whether the content of the media library is stored on a solid state drive.</param>
/// <param name="shouldTrackConsumptionProgress">Whether the consumption progress of the media library items is tracked.</param>
/// <param name="completionThresholdPercentage">The percentage of a media library item that must be consumed for its session to be considered completed.</param>
@@ -53,6 +54,7 @@ public class LibraryEntityFixture
bool canDownloadMetadataFromWeb = true,
bool shouldSaveMetadataInMediaDirectories = true,
bool shouldSkipUnchangedDirectoriesDuringScan = false,
bool shouldSkipHiddenFilesAndDirectoriesDuringScan = false,
bool isContentOnSsd = false,
bool shouldTrackConsumptionProgress = false,
int? completionThresholdPercentage = null,
@@ -77,6 +79,7 @@ public class LibraryEntityFixture
CanDownloadMetadataFromWeb = canDownloadMetadataFromWeb,
ShouldSaveMetadataInMediaDirectories = shouldSaveMetadataInMediaDirectories,
ShouldSkipUnchangedDirectoriesDuringScan = shouldSkipUnchangedDirectoriesDuringScan,
ShouldSkipHiddenFilesAndDirectoriesDuringScan = shouldSkipHiddenFilesAndDirectoriesDuringScan,
IsContentOnSsd = isContentOnSsd,
ShouldTrackConsumptionProgress = shouldTrackConsumptionProgress,
CompletionThresholdPercentage = completionThresholdPercentage,
@@ -28,6 +28,7 @@ public class AddLibraryCommandFixture
/// <param name="canDownloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="shouldSaveMetadataInMediaDirectories">Whether the metadata should be saved in the media directories or not.</param>
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether unchanged directories should be skipped during a scan or not.</param>
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Optional. Whether hidden files and directories should be skipped during a scan or not. When absent, the default is off.</param>
/// <param name="isContentOnSsd">Whether the content of the media library is stored on a solid state drive.</param>
/// <param name="shouldTrackConsumptionProgress">Optional. Whether the consumption progress of the media library items should be tracked, or not.</param>
/// <param name="completionThresholdPercentage">Optional. The percentage of a media library item that must be consumed for its session to be considered completed.</param>
@@ -46,6 +47,7 @@ public class AddLibraryCommandFixture
bool canDownloadMetadataFromWeb = true,
bool shouldSaveMetadataInMediaDirectories = true,
bool shouldSkipUnchangedDirectoriesDuringScan = false,
bool? shouldSkipHiddenFilesAndDirectoriesDuringScan = null,
bool isContentOnSsd = false,
bool? shouldTrackConsumptionProgress = null,
int? completionThresholdPercentage = null,
@@ -65,6 +67,7 @@ public class AddLibraryCommandFixture
true,
true,
false,
null,
false,
shouldTrackConsumptionProgress,
completionThresholdPercentage,
@@ -82,6 +85,7 @@ public class AddLibraryCommandFixture
.RuleFor(x => x.CanDownloadMetadataFromWeb, canDownloadMetadataFromWeb)
.RuleFor(x => x.ShouldSaveMetadataInMediaDirectories, shouldSaveMetadataInMediaDirectories)
.RuleFor(x => x.ShouldSkipUnchangedDirectoriesDuringScan, shouldSkipUnchangedDirectoriesDuringScan)
.RuleFor(x => x.ShouldSkipHiddenFilesAndDirectoriesDuringScan, shouldSkipHiddenFilesAndDirectoriesDuringScan)
.RuleFor(x => x.IsContentOnSsd, isContentOnSsd)
.RuleFor(x => x.PathTemplateParts, pathTemplateParts)
.RuleFor(x => x.MetadataProviders, metadataProviders)
@@ -30,6 +30,7 @@ public class UpdateLibraryCommandFixture
/// <param name="canDownloadMetadataFromWeb">Whether the media library should download metadata from the web or not.</param>
/// <param name="shouldSaveMetadataInMediaDirectories">Whether the metadata should be saved in the media directories or not.</param>
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether unchanged directories should be skipped during a scan or not.</param>
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Optional. Whether hidden files and directories should be skipped during a scan or not. When absent, the stored value is kept.</param>
/// <param name="isContentOnSsd">Whether the content of the media library is stored on a solid state drive.</param>
/// <param name="shouldTrackConsumptionProgress">Optional. Whether the consumption progress of the media library items should be tracked, or not.</param>
/// <param name="completionThresholdPercentage">Optional. The percentage of a media library item that must be consumed for its session to be considered completed.</param>
@@ -49,6 +50,7 @@ public class UpdateLibraryCommandFixture
bool canDownloadMetadataFromWeb = true,
bool shouldSaveMetadataInMediaDirectories = true,
bool shouldSkipUnchangedDirectoriesDuringScan = false,
bool? shouldSkipHiddenFilesAndDirectoriesDuringScan = null,
bool isContentOnSsd = false,
bool? shouldTrackConsumptionProgress = null,
int? completionThresholdPercentage = null,
@@ -69,6 +71,7 @@ public class UpdateLibraryCommandFixture
true,
true,
false,
null,
false,
shouldTrackConsumptionProgress,
completionThresholdPercentage,
@@ -87,6 +90,7 @@ public class UpdateLibraryCommandFixture
.RuleFor(x => x.CanDownloadMetadataFromWeb, canDownloadMetadataFromWeb)
.RuleFor(x => x.ShouldSaveMetadataInMediaDirectories, shouldSaveMetadataInMediaDirectories)
.RuleFor(x => x.ShouldSkipUnchangedDirectoriesDuringScan, shouldSkipUnchangedDirectoriesDuringScan)
.RuleFor(x => x.ShouldSkipHiddenFilesAndDirectoriesDuringScan, shouldSkipHiddenFilesAndDirectoriesDuringScan)
.RuleFor(x => x.IsContentOnSsd, isContentOnSsd)
.RuleFor(x => x.PathTemplateParts, pathTemplateParts)
.RuleFor(x => x.MetadataProviders, metadataProviders)