mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 12:01: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
+5
@@ -80,6 +80,11 @@ public class LibraryEntity : IStorageEntity, IAuditableEntity
|
||||
/// </summary>
|
||||
public bool ShouldSkipUnchangedDirectoriesDuringScan { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether hidden files and directories are skipped during the scan of the media library.
|
||||
/// </summary>
|
||||
public bool ShouldSkipHiddenFilesAndDirectoriesDuringScan { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.
|
||||
/// </summary>
|
||||
|
||||
+8
@@ -23,6 +23,14 @@ public interface IDirectoryScanFingerprintRepository : IRepository<DirectoryScan
|
||||
/// <returns>An <see cref="Result{TValue}"/> containing either a path mapped dictionary of directory scan fingerprints, or an error.</returns>
|
||||
Task<Result<Dictionary<string, DirectoryScanFingerprintEntity>>> GetMappedByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes all the directory scan fingerprints of the media library identified by <paramref name="libraryId"/>.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">The unique identifier of the library whose directory scan fingerprints are deleted.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> representing either a successful operation, or an error.</returns>
|
||||
Task<Result<Deleted>> DeleteByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Inserts or updates the provided directory scan fingerprints in the storage medium.
|
||||
/// </summary>
|
||||
|
||||
+1
@@ -34,6 +34,7 @@ public static class AddMediaLibraryRequestMapping
|
||||
request.CanDownloadMetadataFromWeb,
|
||||
request.ShouldSaveMetadataInMediaDirectories,
|
||||
request.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
request.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
request.IsContentOnSsd,
|
||||
request.ShouldTrackConsumptionProgress,
|
||||
request.CompletionThresholdPercentage,
|
||||
|
||||
@@ -36,6 +36,7 @@ public static class LibraryEntityMapping
|
||||
repositoryEntity.CanDownloadMetadataFromWeb,
|
||||
repositoryEntity.ShouldSaveMetadataInMediaDirectories,
|
||||
repositoryEntity.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
repositoryEntity.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
repositoryEntity.IsContentOnSsd,
|
||||
repositoryEntity.ShouldTrackConsumptionProgress,
|
||||
repositoryEntity.CompletionThresholdPercentage,
|
||||
@@ -74,6 +75,7 @@ public static class LibraryEntityMapping
|
||||
repositoryEntity.CanDownloadMetadataFromWeb,
|
||||
repositoryEntity.ShouldSaveMetadataInMediaDirectories,
|
||||
repositoryEntity.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
repositoryEntity.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
repositoryEntity.IsContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplateResult.Value,
|
||||
|
||||
@@ -38,6 +38,7 @@ public static class LibraryMapping
|
||||
CanDownloadMetadataFromWeb = domainEntity.CanDownloadMetadataFromWeb,
|
||||
ShouldSaveMetadataInMediaDirectories = domainEntity.ShouldSaveMetadataInMediaDirectories,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan = domainEntity.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan = domainEntity.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
IsContentOnSsd = domainEntity.IsContentOnSsd,
|
||||
ShouldTrackConsumptionProgress = domainEntity.ConsumptionSettings.ShouldTrackConsumptionProgress,
|
||||
CompletionThresholdPercentage = domainEntity.ConsumptionSettings.CompletionThresholdPercentage.HasValue
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ public static class UpdateLibraryRequestMapping
|
||||
request.CanDownloadMetadataFromWeb,
|
||||
request.ShouldSaveMetadataInMediaDirectories,
|
||||
request.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
request.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
request.IsContentOnSsd,
|
||||
request.ShouldTrackConsumptionProgress,
|
||||
request.CompletionThresholdPercentage,
|
||||
|
||||
+2
@@ -18,6 +18,7 @@ namespace Lumina.Application.Core.MediaLibrary.Management.Commands.AddLibrary;
|
||||
/// <param name="CanDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not.</param>
|
||||
/// <param name="ShouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.</param>
|
||||
/// <param name="ShouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not. When absent, the default is off.</param>
|
||||
/// <param name="IsContentOnSsd">Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.</param>
|
||||
/// <param name="ShouldTrackConsumptionProgress">Whether the consumption progress of the media library items should be tracked, or not. When absent, the default of the library type is used.</param>
|
||||
/// <param name="CompletionThresholdPercentage">The percentage of a media library item that must be consumed for its session to be considered completed. When absent, the default of the library type is used on creation.</param>
|
||||
@@ -36,6 +37,7 @@ public record AddLibraryCommand(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool? ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
|
||||
+1
@@ -147,6 +147,7 @@ public class AddLibraryCommandHandler : ICommandHandler<AddLibraryCommand, Resul
|
||||
command.CanDownloadMetadataFromWeb,
|
||||
command.ShouldSaveMetadataInMediaDirectories,
|
||||
command.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
command.ShouldSkipHiddenFilesAndDirectoriesDuringScan ?? false,
|
||||
command.IsContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplateResult.Value,
|
||||
|
||||
+2
@@ -20,6 +20,7 @@ namespace Lumina.Application.Core.MediaLibrary.Management.Commands.UpdateLibrary
|
||||
/// <param name="CanDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not.</param>
|
||||
/// <param name="ShouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.</param>
|
||||
/// <param name="ShouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not. When absent, the stored value is kept.</param>
|
||||
/// <param name="IsContentOnSsd">Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.</param>
|
||||
/// <param name="ShouldTrackConsumptionProgress">Whether the consumption progress of the media library items should be tracked, or not. When absent, the stored value is kept.</param>
|
||||
/// <param name="CompletionThresholdPercentage">The percentage of a media library item that must be consumed for its session to be considered completed. When absent, the stored value is kept.</param>
|
||||
@@ -39,6 +40,7 @@ public record UpdateLibraryCommand(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool? ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
|
||||
+14
@@ -114,6 +114,13 @@ public class UpdateLibraryCommandHandler : ICommandHandler<UpdateLibraryCommand,
|
||||
!await _authorizationService.HasPermissionAsync(userId, AuthorizationPermission.CanCreateLibraries, cancellationToken).ConfigureAwait(false))
|
||||
return ApplicationErrors.Authorization.NotAuthorized;
|
||||
bool hasProviderChoices = command.MetadataProviders is not null || command.ArtworkProviders is not null || command.BookReaders is not null;
|
||||
// A missing hidden files setting keeps the stored one, so that a partial update never silently turns it off.
|
||||
bool shouldSkipHiddenFilesAndDirectoriesDuringScan = command.ShouldSkipHiddenFilesAndDirectoriesDuringScan ?? getLibraryResult.Value.ShouldSkipHiddenFilesAndDirectoriesDuringScan;
|
||||
// The directory scan fingerprints are only valid for the scan scope that produced them, so changing either scan scope setting
|
||||
// discards them, forcing the next scan to read the whole library instead of skipping directories that are no longer in scope.
|
||||
bool areScanScopeSettingsChanged =
|
||||
getLibraryResult.Value.ShouldSkipUnchangedDirectoriesDuringScan != command.ShouldSkipUnchangedDirectoriesDuringScan ||
|
||||
getLibraryResult.Value.ShouldSkipHiddenFilesAndDirectoriesDuringScan != shouldSkipHiddenFilesAndDirectoriesDuringScan;
|
||||
|
||||
// Make sure the file is an actual supported image, but only when a new cover image was chosen; the stored cover image is
|
||||
// relative to the application base directory and is already validated, so it must not block saving unrelated changes.
|
||||
@@ -173,6 +180,7 @@ public class UpdateLibraryCommandHandler : ICommandHandler<UpdateLibraryCommand,
|
||||
command.CanDownloadMetadataFromWeb,
|
||||
command.ShouldSaveMetadataInMediaDirectories,
|
||||
command.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
shouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
command.IsContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplateResult.Value,
|
||||
@@ -189,6 +197,12 @@ public class UpdateLibraryCommandHandler : ICommandHandler<UpdateLibraryCommand,
|
||||
Result<Updated> updateLibraryResult = await _unitOfWork.LibraryRepository.UpdateAsync(persistenceLibrary, cancellationToken).ConfigureAwait(false);
|
||||
if (updateLibraryResult.IsFailure)
|
||||
return updateLibraryResult.Errors;
|
||||
if (areScanScopeSettingsChanged)
|
||||
{
|
||||
Result<Deleted> deleteDirectoryScanFingerprintsResult = await _unitOfWork.DirectoryScanFingerprintRepository.DeleteByLibraryIdAsync(command.Id, cancellationToken).ConfigureAwait(false);
|
||||
if (deleteDirectoryScanFingerprintsResult.IsFailure)
|
||||
return deleteDirectoryScanFingerprintsResult.Errors;
|
||||
}
|
||||
bool isLibraryTypeChanged = getLibraryResult.Value.LibraryType != newLibraryType;
|
||||
if (isLibraryTypeChanged || hasProviderChoices)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.Management;
|
||||
/// <param name="CanDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not. Required.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not. Required.</param>
|
||||
/// <param name="ShouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. Required.</param>
|
||||
/// <param name="ShouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not. Optional, the default is off when absent.</param>
|
||||
/// <param name="IsContentOnSsd">Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel. Required.</param>
|
||||
/// <param name="ShouldTrackConsumptionProgress">Whether the consumption progress of the media library items should be tracked, or not. Optional, the default of the library type is used when absent.</param>
|
||||
/// <param name="CompletionThresholdPercentage">The percentage of a media library item that must be consumed for its session to be considered completed. Optional, the default of the library type is used when absent.</param>
|
||||
@@ -34,6 +35,7 @@ public record AddLibraryRequest(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool? ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.Management;
|
||||
/// <param name="CanDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not. Required.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not. Required.</param>
|
||||
/// <param name="ShouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. Required.</param>
|
||||
/// <param name="ShouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not. Optional, the stored value is kept when absent.</param>
|
||||
/// <param name="IsContentOnSsd">Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel. Required.</param>
|
||||
/// <param name="ShouldTrackConsumptionProgress">Whether the consumption progress of the media library items should be tracked, or not. Optional, the stored value is kept when absent.</param>
|
||||
/// <param name="CompletionThresholdPercentage">The percentage of a media library item that must be consumed for its session to be considered completed. Optional, the stored value is kept when absent.</param>
|
||||
@@ -37,6 +38,7 @@ public record class UpdateLibraryRequest(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool? ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace Lumina.Contracts.Responses.MediaLibrary.Management;
|
||||
/// <param name="CanDownloadMetadataFromWeb">Whether the media library should update the metadata of its elements from the web, or not.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether the media library should copy the downloaded metadata into the media library content locations, or not.</param>
|
||||
/// <param name="ShouldSkipUnchangedDirectoriesDuringScan">Whether the media library should skip the directories whose contents have not changed since the last scan, during the scan.</param>
|
||||
/// <param name="ShouldSkipHiddenFilesAndDirectoriesDuringScan">Whether the media library should skip hidden files and directories during the scan.</param>
|
||||
/// <param name="IsContentOnSsd">Whether the content of the media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.</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, when progress tracking is enabled.</param>
|
||||
@@ -40,6 +41,7 @@ public record LibraryResponse(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
|
||||
@@ -83,6 +83,10 @@ public class LibraryConfiguration : IEntityTypeConfiguration<LibraryEntity>
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnOrder(18);
|
||||
|
||||
builder.Property(library => library.ShouldSkipHiddenFilesAndDirectoriesDuringScan)
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnOrder(19);
|
||||
|
||||
// One user with many libraries.
|
||||
builder.HasOne(library => library.User)
|
||||
.WithMany(user => user.Libraries)
|
||||
|
||||
+3963
File diff suppressed because it is too large.
Load diff
+30
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Lumina.DataAccess.Common.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddsShouldSkipHiddenFilesAndDirectoriesDuringScan : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ShouldSkipHiddenFilesAndDirectoriesDuringScan",
|
||||
table: "Libraries",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false)
|
||||
.Annotation("Relational:ColumnOrder", 19);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ShouldSkipHiddenFilesAndDirectoriesDuringScan",
|
||||
table: "Libraries");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1596,6 +1596,12 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(7);
|
||||
|
||||
b.Property<bool>("ShouldSkipHiddenFilesAndDirectoriesDuringScan")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnOrder(19);
|
||||
|
||||
b.Property<bool>("ShouldSkipUnchangedDirectoriesDuringScan")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnOrder(8);
|
||||
|
||||
+14
@@ -55,6 +55,20 @@ internal sealed class DirectoryScanFingerprintRepository : IDirectoryScanFingerp
|
||||
return fingerprints.ToDictionary(fingerprint => fingerprint.Path, StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes all the directory scan fingerprints of the media library identified by <paramref name="libraryId"/>.
|
||||
/// </summary>
|
||||
/// <param name="libraryId">The unique identifier of the library whose directory scan fingerprints are deleted.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>An <see cref="Result{TValue}"/> representing either a successful operation, or an error.</returns>
|
||||
public async Task<Result<Deleted>> DeleteByLibraryIdAsync(Guid libraryId, CancellationToken cancellationToken)
|
||||
{
|
||||
await _luminaDbContext.DirectoryScanFingerprints
|
||||
.Where(fingerprint => fingerprint.LibraryId == libraryId)
|
||||
.ExecuteDeleteAsync(cancellationToken).ConfigureAwait(false);
|
||||
return Result.Deleted;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inserts or updates the provided directory scan fingerprints in the storage medium.
|
||||
/// </summary>
|
||||
|
||||
+14
@@ -76,6 +76,11 @@ public class Library : AggregateRoot<LibraryId>
|
||||
/// </summary>
|
||||
public bool ShouldSkipUnchangedDirectoriesDuringScan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether this media library should skip hidden files and directories during the scan, or not.
|
||||
/// </summary>
|
||||
public bool ShouldSkipHiddenFilesAndDirectoriesDuringScan { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether the content of this media library is stored on a solid state drive. When it is, the file discovery and content hashing stages read the files in parallel,
|
||||
/// which takes advantage of the low latency of solid state drives. Mechanical hard drives keep those reads sequential, because parallel reads can reduce their throughput.
|
||||
@@ -117,6 +122,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
/// <param name="canDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not.</param>
|
||||
/// <param name="shouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not.</param>
|
||||
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.</param>
|
||||
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not.</param>
|
||||
/// <param name="isContentOnSsd">Whether the content of this media library is stored on a solid state drive.</param>
|
||||
/// <param name="consumptionSettings">The consumption settings of the media library.</param>
|
||||
/// <param name="pathTemplate">The template describing the structure of the media library on disk.</param>
|
||||
@@ -133,6 +139,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
bool canDownloadMetadataFromWeb,
|
||||
bool shouldSaveMetadataInMediaDirectories,
|
||||
bool shouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool shouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool isContentOnSsd,
|
||||
LibraryConsumptionSettings consumptionSettings,
|
||||
LibraryPathTemplate pathTemplate,
|
||||
@@ -148,6 +155,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
CanDownloadMetadataFromWeb = canDownloadMetadataFromWeb;
|
||||
ShouldSaveMetadataInMediaDirectories = shouldSaveMetadataInMediaDirectories;
|
||||
ShouldSkipUnchangedDirectoriesDuringScan = shouldSkipUnchangedDirectoriesDuringScan;
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan = shouldSkipHiddenFilesAndDirectoriesDuringScan;
|
||||
IsContentOnSsd = isContentOnSsd;
|
||||
ConsumptionSettings = consumptionSettings;
|
||||
PathTemplate = pathTemplate;
|
||||
@@ -167,6 +175,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
/// <param name="canDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not.</param>
|
||||
/// <param name="shouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not.</param>
|
||||
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.</param>
|
||||
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not.</param>
|
||||
/// <param name="isContentOnSsd">Whether the content of this media library is stored on a solid state drive.</param>
|
||||
/// <param name="consumptionSettings">The consumption settings of the media library.</param>
|
||||
/// <param name="pathTemplate">The template describing the structure of the media library on disk.</param>
|
||||
@@ -185,6 +194,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
bool canDownloadMetadataFromWeb,
|
||||
bool shouldSaveMetadataInMediaDirectories,
|
||||
bool shouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool shouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool isContentOnSsd,
|
||||
LibraryConsumptionSettings consumptionSettings,
|
||||
LibraryPathTemplate pathTemplate,
|
||||
@@ -211,6 +221,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
canDownloadMetadataFromWeb,
|
||||
shouldSaveMetadataInMediaDirectories,
|
||||
shouldSkipUnchangedDirectoriesDuringScan,
|
||||
shouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
isContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplate,
|
||||
@@ -232,6 +243,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
/// <param name="canDownloadMetadataFromWeb">Whether this media library should update the metadata of its elements from the web, or not.</param>
|
||||
/// <param name="shouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not.</param>
|
||||
/// <param name="shouldSkipUnchangedDirectoriesDuringScan">Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.</param>
|
||||
/// <param name="shouldSkipHiddenFilesAndDirectoriesDuringScan">Whether this media library should skip hidden files and directories during the scan, or not.</param>
|
||||
/// <param name="isContentOnSsd">Whether the content of this media library is stored on a solid state drive.</param>
|
||||
/// <param name="consumptionSettings">The consumption settings of the media library.</param>
|
||||
/// <param name="pathTemplate">The template describing the structure of the media library on disk.</param>
|
||||
@@ -251,6 +263,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
bool canDownloadMetadataFromWeb,
|
||||
bool shouldSaveMetadataInMediaDirectories,
|
||||
bool shouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool shouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
bool isContentOnSsd,
|
||||
LibraryConsumptionSettings consumptionSettings,
|
||||
LibraryPathTemplate pathTemplate,
|
||||
@@ -277,6 +290,7 @@ public class Library : AggregateRoot<LibraryId>
|
||||
canDownloadMetadataFromWeb,
|
||||
shouldSaveMetadataInMediaDirectories,
|
||||
shouldSkipUnchangedDirectoriesDuringScan,
|
||||
shouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
isContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplate,
|
||||
|
||||
+5
-2
@@ -133,6 +133,7 @@ internal sealed class MusicFileSystemDiscoveryJob : MediaLibraryScanJob, IMusicF
|
||||
contentLocation.Path,
|
||||
fileProviderService,
|
||||
directoryProviderService,
|
||||
domainLibraryResult.Value.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
fingerprintsByPath is not null,
|
||||
shouldParallelizeReads,
|
||||
fingerprintsByPath,
|
||||
@@ -196,6 +197,7 @@ internal sealed class MusicFileSystemDiscoveryJob : MediaLibraryScanJob, IMusicF
|
||||
/// <param name="rootDirectoryPath">The path of the root directory from which to start collecting files.</param>
|
||||
/// <param name="fileProviderService">The service used to enumerate the files of a directory.</param>
|
||||
/// <param name="directoryProviderService">The service used to enumerate the subdirectories of a directory.</param>
|
||||
/// <param name="shouldSkipHiddenFilesAndDirectories">Whether to skip hidden files and directories, or not.</param>
|
||||
/// <param name="shouldSkipUnchangedDirectories">Whether to skip the directories whose last write time has not changed since the last scan, or not.</param>
|
||||
/// <param name="shouldParallelizeReads">Whether the file system reads should run in parallel, which benefits solid state drives.</param>
|
||||
/// <param name="fingerprintsByPath">The directory scan fingerprints of the library, mapped by the directory path. Can be <see langword="null"/> when the fast skip is disabled.</param>
|
||||
@@ -212,6 +214,7 @@ internal sealed class MusicFileSystemDiscoveryJob : MediaLibraryScanJob, IMusicF
|
||||
string rootDirectoryPath,
|
||||
IFileProviderService fileProviderService,
|
||||
IDirectoryProviderService directoryProviderService,
|
||||
bool shouldSkipHiddenFilesAndDirectories,
|
||||
bool shouldSkipUnchangedDirectories,
|
||||
bool shouldParallelizeReads,
|
||||
Dictionary<string, DirectoryScanFingerprintEntity>? fingerprintsByPath,
|
||||
@@ -265,7 +268,7 @@ internal sealed class MusicFileSystemDiscoveryJob : MediaLibraryScanJob, IMusicF
|
||||
}
|
||||
|
||||
// Process the files of the current directory.
|
||||
Result<IEnumerable<FileSystemPathId>> getFilesResult = fileProviderService.GetFilePaths(currentDirectory, true);
|
||||
Result<IEnumerable<FileSystemPathId>> getFilesResult = fileProviderService.GetFilePaths(currentDirectory, !shouldSkipHiddenFilesAndDirectories);
|
||||
if (getFilesResult.IsSuccess)
|
||||
{
|
||||
if (shouldParallelizeReads)
|
||||
@@ -291,7 +294,7 @@ internal sealed class MusicFileSystemDiscoveryJob : MediaLibraryScanJob, IMusicF
|
||||
}
|
||||
|
||||
// Process the subdirectories - each new subdirectory is added to the same queue, for later processing.
|
||||
Result<IEnumerable<FileSystemPathId>> getSubdirectoriesResult = directoryProviderService.GetSubdirectoryPaths(currentDirectory, true);
|
||||
Result<IEnumerable<FileSystemPathId>> getSubdirectoriesResult = directoryProviderService.GetSubdirectoryPaths(currentDirectory, !shouldSkipHiddenFilesAndDirectories);
|
||||
if (getSubdirectoriesResult.IsSuccess)
|
||||
{
|
||||
foreach (FileSystemPathId subdirectory in getSubdirectoriesResult.Value)
|
||||
|
||||
+15
-3
@@ -41,12 +41,18 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
],
|
||||
StringComparer.OrdinalIgnoreCase
|
||||
);
|
||||
private static readonly EnumerationOptions s_enumerationOptions = new()
|
||||
private static readonly EnumerationOptions s_includingHiddenEnumerationOptions = new()
|
||||
{
|
||||
AttributesToSkip = FileAttributes.None, // Hidden files and directories are included in the discovery.
|
||||
IgnoreInaccessible = true,
|
||||
RecurseSubdirectories = false
|
||||
};
|
||||
private static readonly EnumerationOptions s_skippingHiddenEnumerationOptions = new()
|
||||
{
|
||||
AttributesToSkip = FileAttributes.Hidden,
|
||||
IgnoreInaccessible = true,
|
||||
RecurseSubdirectories = false
|
||||
};
|
||||
private readonly IServiceScopeFactory _serviceScopeFactory;
|
||||
private readonly ILogger<BooksFileSystemDiscoveryJob> _logger;
|
||||
|
||||
@@ -134,6 +140,7 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
|
||||
await DiscoverContentLocationAsync(
|
||||
contentLocation.Path,
|
||||
domainLibraryResult.Value.ShouldSkipHiddenFilesAndDirectoriesDuringScan,
|
||||
fingerprintsByPath is not null,
|
||||
shouldParallelizeReads,
|
||||
fingerprintsByPath,
|
||||
@@ -195,6 +202,7 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
/// Discovers the book files of a content location of the media library, using a breadth-first traversal, and writes them in batches to the staging results.
|
||||
/// </summary>
|
||||
/// <param name="rootDirectoryPath">The path of the root directory from which to start collecting files.</param>
|
||||
/// <param name="shouldSkipHiddenFilesAndDirectories">Whether to skip hidden files and directories, or not.</param>
|
||||
/// <param name="shouldSkipUnchangedDirectories">Whether to skip the directories whose last write time has not changed since the last scan, or not.</param>
|
||||
/// <param name="shouldParallelizeReads">Whether the file system reads should run in parallel, which benefits solid state drives.</param>
|
||||
/// <param name="fingerprintsByPath">The directory scan fingerprints of the library, mapped by the directory path. Can be <see langword="null"/> when the fast skip is disabled.</param>
|
||||
@@ -209,6 +217,7 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
|
||||
private async Task DiscoverContentLocationAsync(
|
||||
string rootDirectoryPath,
|
||||
bool shouldSkipHiddenFilesAndDirectories,
|
||||
bool shouldSkipUnchangedDirectories,
|
||||
bool shouldParallelizeReads,
|
||||
Dictionary<string, DirectoryScanFingerprintEntity>? fingerprintsByPath,
|
||||
@@ -218,6 +227,9 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
IDirectoryScanFingerprintRepository directoryScanFingerprintRepository,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
EnumerationOptions enumerationOptions = shouldSkipHiddenFilesAndDirectories
|
||||
? s_skippingHiddenEnumerationOptions
|
||||
: s_includingHiddenEnumerationOptions;
|
||||
Queue<DirectoryInfo> directoryQueue = new();
|
||||
directoryQueue.Enqueue(new DirectoryInfo(rootDirectoryPath));
|
||||
|
||||
@@ -257,7 +269,7 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
IEnumerable<FileInfo>? files = null;
|
||||
try
|
||||
{
|
||||
files = currentDirectory.EnumerateFiles("*", s_enumerationOptions)
|
||||
files = currentDirectory.EnumerateFiles("*", enumerationOptions)
|
||||
.Where(file => s_bookExtensions.Contains(file.Extension));
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
@@ -300,7 +312,7 @@ internal sealed class BooksFileSystemDiscoveryJob : MediaLibraryScanJob, IBooksF
|
||||
IEnumerable<DirectoryInfo>? subdirectories = null;
|
||||
try
|
||||
{
|
||||
subdirectories = currentDirectory.EnumerateDirectories("*", s_enumerationOptions);
|
||||
subdirectories = currentDirectory.EnumerateDirectories("*", enumerationOptions);
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
|
||||
+4
@@ -37,6 +37,7 @@ public class AddLibraryEndpointSummary : Summary<AddLibraryEndpoint, AddLibraryR
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
@@ -55,6 +56,7 @@ public class AddLibraryEndpointSummary : Summary<AddLibraryEndpoint, AddLibraryR
|
||||
RequestParam(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not. Optional, the default is off when absent.");
|
||||
RequestParam(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel. Optional.");
|
||||
RequestParam(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items should be tracked, or not. Optional, the default of the library type is used when absent.");
|
||||
RequestParam(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed. Optional, the default of the library type is used when absent.");
|
||||
@@ -74,6 +76,7 @@ public class AddLibraryEndpointSummary : Summary<AddLibraryEndpoint, AddLibraryR
|
||||
ResponseParam<LibraryResponse>(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items is tracked.");
|
||||
ResponseParam<LibraryResponse>(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed, when progress tracking is enabled.");
|
||||
@@ -94,6 +97,7 @@ public class AddLibraryEndpointSummary : Summary<AddLibraryEndpoint, AddLibraryR
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
|
||||
+3
@@ -33,6 +33,7 @@ public class GetEnabledLibrariesEndpointSummary : Summary<GetEnabledLibrariesEnd
|
||||
ResponseParam<LibraryResponse>(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items is tracked.");
|
||||
ResponseParam<LibraryResponse>(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed, when progress tracking is enabled.");
|
||||
@@ -54,6 +55,7 @@ public class GetEnabledLibrariesEndpointSummary : Summary<GetEnabledLibrariesEnd
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
@@ -73,6 +75,7 @@ public class GetEnabledLibrariesEndpointSummary : Summary<GetEnabledLibrariesEnd
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: true,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
|
||||
+3
@@ -33,6 +33,7 @@ public class GetLibrariesEndpointSummary : Summary<GetLibrariesEndpoint, EmptyRe
|
||||
ResponseParam<LibraryResponse>(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items is tracked.");
|
||||
ResponseParam<LibraryResponse>(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed, when progress tracking is enabled.");
|
||||
@@ -54,6 +55,7 @@ public class GetLibrariesEndpointSummary : Summary<GetLibrariesEndpoint, EmptyRe
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
@@ -73,6 +75,7 @@ public class GetLibrariesEndpointSummary : Summary<GetLibrariesEndpoint, EmptyRe
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: true,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
|
||||
+2
@@ -41,6 +41,7 @@ public class GetLibraryEndpointSummary : Summary<GetLibraryEndpoint, GetLibraryR
|
||||
ResponseParam<LibraryResponse>(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items is tracked.");
|
||||
ResponseParam<LibraryResponse>(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed, when progress tracking is enabled.");
|
||||
@@ -60,6 +61,7 @@ public class GetLibraryEndpointSummary : Summary<GetLibraryEndpoint, GetLibraryR
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
|
||||
+4
@@ -38,6 +38,7 @@ public class UpdateLibraryEndpointSummary : Summary<UpdateLibraryEndpoint, Updat
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
@@ -57,6 +58,7 @@ public class UpdateLibraryEndpointSummary : Summary<UpdateLibraryEndpoint, Updat
|
||||
RequestParam(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not. Optional, the stored value is kept when absent.");
|
||||
RequestParam(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel. Optional.");
|
||||
RequestParam(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items should be tracked, or not. Optional, the stored value is kept when absent.");
|
||||
RequestParam(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed. Optional, the stored value is kept when absent.");
|
||||
@@ -76,6 +78,7 @@ public class UpdateLibraryEndpointSummary : Summary<UpdateLibraryEndpoint, Updat
|
||||
ResponseParam<LibraryResponse>(r => r.CanDownloadMetadataFromWeb, "Whether this media library should update the metadata of its elements from the web, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSaveMetadataInMediaDirectories, "Whether this media library should copy the downloaded metadata into the media library content locations, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether this media library should skip hidden files and directories during the scan, or not.");
|
||||
ResponseParam<LibraryResponse>(r => r.IsContentOnSsd, "Whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.");
|
||||
ResponseParam<LibraryResponse>(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items is tracked.");
|
||||
ResponseParam<LibraryResponse>(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed, when progress tracking is enabled.");
|
||||
@@ -96,6 +99,7 @@ public class UpdateLibraryEndpointSummary : Summary<UpdateLibraryEndpoint, Updat
|
||||
CanDownloadMetadataFromWeb: true,
|
||||
ShouldSaveMetadataInMediaDirectories: false,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: false,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: false,
|
||||
IsContentOnSsd: false,
|
||||
ShouldTrackConsumptionProgress: true,
|
||||
CompletionThresholdPercentage: 90,
|
||||
|
||||
@@ -63,6 +63,11 @@ public class LibraryDto
|
||||
/// </summary>
|
||||
public bool ShouldSkipUnchangedDirectoriesDuringScan { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether this media library should skip hidden files and directories during the scan, or not. When absent, the default is off on create, and the stored value is kept on update.
|
||||
/// </summary>
|
||||
public bool? ShouldSkipHiddenFilesAndDirectoriesDuringScan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether the content of this media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel.
|
||||
/// </summary>
|
||||
|
||||
+1
@@ -30,6 +30,7 @@ public class SaveLibraryEndpointSummary : Summary<SaveLibraryEndpoint, LibraryDt
|
||||
RequestParam(r => r.CanDownloadMetadataFromWeb, "Whether the metadata of the media library items should be downloaded from the web, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSaveMetadataInMediaDirectories, "Whether the downloaded metadata should be copied into the media library content locations, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSkipUnchangedDirectoriesDuringScan, "Whether the directories whose contents have not changed since the last scan should be skipped during the scan, or not. Optional.");
|
||||
RequestParam(r => r.ShouldSkipHiddenFilesAndDirectoriesDuringScan, "Whether hidden files and directories should be skipped during the scan, or not. Optional, the stored value is kept when absent.");
|
||||
RequestParam(r => r.IsContentOnSsd, "Whether the content of the media library is stored on a solid state drive, in which case the file discovery and content hashing stages read the files in parallel. Optional.");
|
||||
RequestParam(r => r.ShouldTrackConsumptionProgress, "Whether the consumption progress of the media library items should be tracked, or not. Optional, the default of the library type is used on create, and the stored value is kept on update.");
|
||||
RequestParam(r => r.CompletionThresholdPercentage, "The percentage of a media library item that must be consumed for its session to be considered completed. Optional, the default of the library type is used on create, and the stored value is kept on update.");
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>ما إذا كان يجب حفظ نسخة من البيانات الوصفية التي تم تنزيلها في المجلدات التي تحتوي على محتوى مكتبة الوسائط أم لا. هذا يؤثر فقط إذا كان تنزيل البيانات الوصفية من الويب مفعّلًا.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>عند التمكين، يتم استبعاد الملفات والمجلدات المخفية من عمليات فحص مكتبة الوسائط هذه.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>عند التفعيل، يستخدم هذا الخيار البيانات الوصفية للمجلدات لتخطي المجلدات التي لم تتغير منذ آخر فحص. يمكن أن يؤدي ذلك إلى تسريع عمليات الفحص _بشكل ملحوظ_، لكن انتبه إلى أن البيانات الوصفية للمجلدات _لا تتغير ولا تُحدَّث_ عند تعديل الملفات الموجودة، بل تتغير فقط عند إضافة ملفات جديدة أو حذف ملفات موجودة. فعّل هذا الخيار فقط إذا كنت لا تعدّل الملفات الموجودة.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>حفظ البيانات الوصفية في مجلدات الوسائط</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>تخطي الملفات والمجلدات المخفية أثناء الفحص</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>تخطي المجلدات غير المتغيرة أثناء الفحص</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Ob eine Kopie der heruntergeladenen Metadaten in den Verzeichnissen der Medienbibliothek gespeichert werden soll oder nicht. Dies hat nur eine Auswirkung, wenn das Herunterladen von Metadaten aus dem Web aktiv ist.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Wenn diese Option aktiviert ist, werden versteckte Dateien und Ordner bei den Scans dieser Medienbibliothek ausgelassen.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Wenn diese Option aktiviert ist, verwendet sie Verzeichnismetadaten, um Verzeichnisse zu überspringen, die sich seit dem letzten Scan nicht geändert haben. Dies kann die Scans _erheblich_ beschleunigen, aber beachten Sie, dass sich die Metadaten von Verzeichnissen _nicht_ ändern/aktualisieren, wenn vorhandene Dateien bearbeitet werden, sondern nur, wenn neue Dateien hinzugefügt oder vorhandene gelöscht werden. Aktivieren Sie diese Option nur, wenn Sie keine vorhandenen Dateien ändern.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Metadaten In Medienverzeichnissen Speichern</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Versteckte Dateien und Ordner Beim Scannen Überspringen</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Unveränderte Ordner Beim Scannen Überspringen</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Whether to save a copy of the downloaded metadata in the media library content locations directories, or not. This only has an effect if downloading metadata from the web is active.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>When enabled, hidden files and directories are left out of the scans of this media library.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>When enabled, this option uses directory metadata to skip directories that have not changed since the last scan. This can _significantly_ speed up scans, but be aware that directories metadata _does not_ change/update when editing existing files, it does so only when adding new files or deleting existing ones. Only enable this if you don't modify existing files.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Save Metadata In Media Directories</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Skip Hidden Files and Directories During Scan</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Skip Unchanged Directories During Scan</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Si guardar o no una copia de los metadatos descargados en los directorios de contenido de la biblioteca multimedia. Esto solo tiene efecto si la descarga de metadatos desde la web está activa.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Cuando está habilitada, los archivos y carpetas ocultos se excluyen de los análisis de esta biblioteca multimedia.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Cuando esta opción está habilitada, utiliza los metadatos de los directorios para omitir los directorios que no han cambiado desde el último escaneo. Esto puede acelerar _significativamente_ los escaneos, pero tenga en cuenta que los metadatos de los directorios _no_ cambian/actualizan al editar archivos existentes, solo lo hacen al agregar archivos nuevos o eliminar archivos existentes. Habilite esta opción solo si no modifica archivos existentes.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Guardar Metadatos En Los Directorios Multimedia</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Omitir Archivos y Carpetas Ocultos Durante el Análisis</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Omitir Carpetas Sin Cambios Durante El Escaneo</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Si une copie des métadonnées téléchargées doit être sauvegardée dans les répertoires de contenu de la médiathèque ou non. Ceci n'a d'effet que si le téléchargement des métadonnées depuis le web est actif.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Lorsque cette option est activée, les fichiers et dossiers cachés sont exclus des analyses de cette bibliothèque multimédia.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Lorsque cette option est activée, elle utilise les métadonnées des dossiers pour ignorer les dossiers qui n'ont pas changé depuis la dernière analyse. Cela peut accélérer _considérablement_ les analyses, mais sachez que les métadonnées des dossiers _ne_ changent/mettent _pas_ à jour lors de la modification de fichiers existants, seulement lors de l'ajout de nouveaux fichiers ou de la suppression de fichiers existants. N'activez cette option que si vous ne modifiez pas les fichiers existants.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Sauvegarder Les Métadonnées Dans Les Répertoires Média</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Ignorer Les Fichiers Et Dossiers Cachés Lors De L'Analyse</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Ignorer Les Dossiers Inchangés Lors De L'Analyse</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Se salvare o meno una copia dei metadati scaricati nelle directory dei contenuti della libreria multimediale. Questo ha effetto solo se il download dei metadati dal web è attivo.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Quando è abilitata, i file e le cartelle nascosti vengono esclusi dalle scansioni di questa libreria multimediale.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Quando questa opzione è abilitata, utilizza i metadati delle cartelle per saltare le cartelle che non sono cambiate dall'ultima scansione. Questo può accelerare _significativamente_ le scansioni, ma tieni presente che i metadati delle cartelle _non_ cambiano/aggiornano quando si modificano file esistenti, lo fanno solo quando si aggiungono nuovi file o si eliminano file esistenti. Abilita questa opzione solo se non modifichi i file esistenti.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Salvare I Metadati Nelle Directory Multimediali</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Ignora File e Cartelle Nascosti Durante la Scansione</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Salta Cartelle Invariate Durante La Scansione</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>ダウンロードしたメタデータのコピーをメディアライブラリのコンテンツディレクトリに保存するかどうか。これはウェブからのメタデータのダウンロードが有効な場合のみ効果があります。</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>有効にすると、このメディアライブラリのスキャンから隠しファイルと隠しフォルダーが除外されます。</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>このオプションを有効にすると、ディレクトリのメタデータを使用して、前回のスキャン以降に変更されていないディレクトリをスキップします。これによりスキャンを_大幅に_高速化できますが、既存のファイルを編集してもディレクトリのメタデータは_変更/更新されない_ことに注意してください。変更されるのは、新しいファイルを追加したときや既存のファイルを削除したときだけです。既存のファイルを変更しない場合にのみ有効にしてください。</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>メディアディレクトリにメタデータを保存</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>スキャン中に隠しファイルと隠しフォルダーをスキップする</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>スキャン中に変更のないフォルダをスキップ</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Whether to save a copy of the downloaded metadata in the media library content locations directories, or not. This only has an effect if downloading metadata from the web is active.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>When enabled, hidden files and directories are left out of the scans of this media library.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>When enabled, this option uses directory metadata to skip directories that have not changed since the last scan. This can _significantly_ speed up scans, but be aware that directories metadata _does not_ change/update when editing existing files, it does so only when adding new files or deleting existing ones. Only enable this if you don't modify existing files.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Save Metadata In Media Directories</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Skip Hidden Files and Directories During Scan</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Skip Unchanged Directories During Scan</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Dacă se salvează sau nu o copie a metadatelor descărcate în directoarele cu conținut ale bibliotecii media. Acest lucru are efect doar dacă descărcarea metadatelor de pe web este activă.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Când este activată, fișierele și dosarele ascunse sunt excluse din scanările acestei biblioteci media.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Când această opțiune este activată, folosește metadatele directorului pentru a sări peste directoarele care nu s-au schimbat de la ultima scanare. Acest lucru poate accelera _semnificativ_ scanările, dar rețineți că metadatele directoarelor _nu_ se schimbă/actualizează atunci când editați fișiere existente, se schimbă doar atunci când adăugați fișiere noi sau ștergeți fișiere existente. Activați această opțiune numai dacă nu modificați fișierele existente.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Salvează Metadatele În Directoarele Media</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Omite Fișierele și Dosarele Ascunse În Timpul Scanării</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Sari Peste Directorarele Neschimbate În Timpul Scanării</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Чи зберігати копію завантажених метаданих у каталогах вмісту медіатеки чи ні. Це діє лише якщо активне завантаження метаданих з інтернету.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Коли ввімкнено, приховані файли та папки не включаються до сканування цієї медіатеки.</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Під час увімкнення цієї опції використовуються метадані каталогів, щоб пропускати каталоги, які не змінювалися з моменту останнього сканування. Це може _значно_ прискорити сканування, але врахуйте, що метадані каталогів _не_ змінюються/оновлюються під час редагування наявних файлів, а лише під час додавання нових або видалення наявних. Вмикайте цю опцію лише в тому випадку, якщо ви не змінюєте наявні файли.</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>Зберігати метадані в каталогах медіафайлів</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Пропускати Приховані Файли та Папки Під Час Сканування</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>Пропускати незмінені папки під час сканування</value>
|
||||
</data>
|
||||
|
||||
@@ -189,6 +189,9 @@
|
||||
<data name="DescriptionShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>是否在媒体库内容位置目录中保存已下载元数据的副本。这仅在从网络下载元数据处于活动状态时才有效。</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>启用后,此媒体库的扫描将不包含隐藏文件和隐藏文件夹。</value>
|
||||
</data>
|
||||
<data name="DescriptionShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>启用此选项后,将使用目录元数据跳过自上次扫描以来未更改的目录。这可以_显著_加快扫描速度,但请注意,编辑现有文件时目录元数据_不会_更改/更新,只有在添加新文件或删除现有文件时才会更改。仅当您不修改现有文件时才启用此选项。</value>
|
||||
</data>
|
||||
@@ -285,6 +288,9 @@
|
||||
<data name="ShouldSaveMetadataInMediaDirectories" xml:space="preserve">
|
||||
<value>在媒体目录中保存元数据</value>
|
||||
</data>
|
||||
<data name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>扫描时跳过隐藏文件和文件夹</value>
|
||||
</data>
|
||||
<data name="ShouldSkipUnchangedDirectoriesDuringScan" xml:space="preserve">
|
||||
<value>扫描时跳过未更改的文件夹</value>
|
||||
</data>
|
||||
|
||||
@@ -206,6 +206,18 @@
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionShouldSkipUnchangedDirectoriesDuringScan"]</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="ShouldSkipHiddenFilesAndDirectoriesDuringScan">@_localizer["ShouldSkipHiddenFilesAndDirectoriesDuringScan"]:</label>
|
||||
</div>
|
||||
<div class="form-field">
|
||||
<label class="enlightenment-checkbox-label">
|
||||
<input type="checkbox" id="ShouldSkipHiddenFilesAndDirectoriesDuringScan" name="ShouldSkipHiddenFilesAndDirectoriesDuringScan" value="true" checked="@(Model.ShouldSkipHiddenFilesAndDirectoriesDuringScan == true)" class="enlightenment-checkbox-hidden" />
|
||||
<span class="enlightenment-checkbox"></span>
|
||||
</label>
|
||||
</div>
|
||||
<small class="form-label text-disabled form-description">@_localizer["DescriptionShouldSkipHiddenFilesAndDirectoriesDuringScan"]</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-label">
|
||||
<label asp-for="IsContentOnSsd">@_localizer["IsContentOnSsd"]:</label>
|
||||
@@ -377,6 +389,7 @@
|
||||
const chkCanDownloadMetadataFromWeb = form.querySelector('[name="CanDownloadMetadataFromWeb"]');
|
||||
const chkShouldSaveMetadataInMediaDirectories = form.querySelector('[name="ShouldSaveMetadataInMediaDirectories"]');
|
||||
const chkShouldSkipUnchangedDirectoriesDuringScan = form.querySelector('[name="ShouldSkipUnchangedDirectoriesDuringScan"]');
|
||||
const chkShouldSkipHiddenFilesAndDirectoriesDuringScan = form.querySelector('[name="ShouldSkipHiddenFilesAndDirectoriesDuringScan"]');
|
||||
const chkIsContentOnSsd = form.querySelector('[name="IsContentOnSsd"]');
|
||||
const chkShouldTrackConsumptionProgress = form.querySelector('[name="ShouldTrackConsumptionProgress"]');
|
||||
const inputCompletionThresholdPercentage = form.querySelector('[name="CompletionThresholdPercentage"]');
|
||||
@@ -410,6 +423,7 @@
|
||||
CanDownloadMetadataFromWeb: chkCanDownloadMetadataFromWeb.checked,
|
||||
ShouldSaveMetadataInMediaDirectories: chkShouldSaveMetadataInMediaDirectories.checked,
|
||||
ShouldSkipUnchangedDirectoriesDuringScan: chkShouldSkipUnchangedDirectoriesDuringScan.checked,
|
||||
ShouldSkipHiddenFilesAndDirectoriesDuringScan: chkShouldSkipHiddenFilesAndDirectoriesDuringScan.checked,
|
||||
IsContentOnSsd: chkIsContentOnSsd.checked,
|
||||
ShouldTrackConsumptionProgress: shouldTrackConsumptionProgress,
|
||||
// An empty threshold is sent as null: creating a library or enabling progress tracking uses the type default,
|
||||
|
||||
Reference in new issue
Block a user