diff --git a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/AddMediaLibraryRequestMapping.cs b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/AddMediaLibraryRequestMapping.cs index 0005fa63..0c62bc02 100644 --- a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/AddMediaLibraryRequestMapping.cs +++ b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/AddMediaLibraryRequestMapping.cs @@ -29,6 +29,7 @@ public static class AddMediaLibraryRequestMapping request.CanDownloadMetadataFromWeb, request.ShouldSaveMetadataInMediaDirectories, request.ShouldSkipUnchangedDirectoriesDuringScan, + request.IsContentOnSsd, request.ShouldTrackConsumptionProgress, request.CompletionThresholdPercentage, request.PathTemplateParts?.Select(part => new LibraryPathTemplatePartDto(part.Kind, part.Representation, part.IsOptional)).ToArray() diff --git a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryEntityMapping.cs b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryEntityMapping.cs index 52e3d970..aed072db 100644 --- a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryEntityMapping.cs +++ b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryEntityMapping.cs @@ -36,6 +36,7 @@ public static class LibraryEntityMapping repositoryEntity.CanDownloadMetadataFromWeb, repositoryEntity.ShouldSaveMetadataInMediaDirectories, repositoryEntity.ShouldSkipUnchangedDirectoriesDuringScan, + repositoryEntity.IsContentOnSsd, repositoryEntity.ShouldTrackConsumptionProgress, repositoryEntity.CompletionThresholdPercentage, [.. repositoryEntity.PathTemplateParts @@ -73,6 +74,7 @@ public static class LibraryEntityMapping repositoryEntity.CanDownloadMetadataFromWeb, repositoryEntity.ShouldSaveMetadataInMediaDirectories, repositoryEntity.ShouldSkipUnchangedDirectoriesDuringScan, + repositoryEntity.IsContentOnSsd, consumptionSettings, pathTemplateResult.Value, [.. repositoryEntity.LibraryScans.Select(libraryScan => ScanId.Create(libraryScan.Id))] diff --git a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryMapping.cs b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryMapping.cs index deeb00d9..9d61a1b1 100644 --- a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryMapping.cs +++ b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/LibraryMapping.cs @@ -39,6 +39,7 @@ public static class LibraryMapping CanDownloadMetadataFromWeb = domainEntity.CanDownloadMetadataFromWeb, ShouldSaveMetadataInMediaDirectories = domainEntity.ShouldSaveMetadataInMediaDirectories, ShouldSkipUnchangedDirectoriesDuringScan = domainEntity.ShouldSkipUnchangedDirectoriesDuringScan, + IsContentOnSsd = domainEntity.IsContentOnSsd, ShouldTrackConsumptionProgress = domainEntity.ConsumptionSettings.ShouldTrackConsumptionProgress, CompletionThresholdPercentage = domainEntity.ConsumptionSettings.CompletionThresholdPercentage.HasValue ? domainEntity.ConsumptionSettings.CompletionThresholdPercentage.Value diff --git a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/UpdateLibraryRequestMapping.cs b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/UpdateLibraryRequestMapping.cs index dcc62c28..6ab4c212 100644 --- a/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/UpdateLibraryRequestMapping.cs +++ b/src/Lumina.Application/Common/Mapping/MediaLibrary/Management/UpdateLibraryRequestMapping.cs @@ -31,6 +31,7 @@ public static class UpdateLibraryRequestMapping request.CanDownloadMetadataFromWeb, request.ShouldSaveMetadataInMediaDirectories, request.ShouldSkipUnchangedDirectoriesDuringScan, + request.IsContentOnSsd, request.ShouldTrackConsumptionProgress, request.CompletionThresholdPercentage, request.PathTemplateParts?.Select(part => new LibraryPathTemplatePartDto(part.Kind, part.Representation, part.IsOptional)).ToArray() diff --git a/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommand.cs b/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommand.cs index 98a3a3c6..6b013e07 100644 --- a/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommand.cs +++ b/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommand.cs @@ -18,6 +18,7 @@ namespace Lumina.Application.Core.MediaLibrary.Management.Commands.AddLibrary; /// Whether this media library should update the metadata of its elements from the web, or not. /// Whether this media library should copy the downloaded metadata into the media library content locations, or not. /// Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. +/// 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. /// Whether the consumption progress of the media library items should be tracked, or not. When absent, the default of the library type is used. /// 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. /// The ordered parts of the template describing the structure of the media library on disk. @@ -32,6 +33,7 @@ public record AddLibraryCommand( bool CanDownloadMetadataFromWeb, bool ShouldSaveMetadataInMediaDirectories, bool ShouldSkipUnchangedDirectoriesDuringScan, + bool IsContentOnSsd, bool? ShouldTrackConsumptionProgress, int? CompletionThresholdPercentage, LibraryPathTemplatePartDto[]? PathTemplateParts diff --git a/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommandHandler.cs b/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommandHandler.cs index d6c2fb97..1a4cf50b 100644 --- a/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommandHandler.cs +++ b/src/Lumina.Application/Core/MediaLibrary/Management/Commands/AddLibrary/AddLibraryCommandHandler.cs @@ -147,6 +147,7 @@ public class AddLibraryCommandHandler : ICommandHandlerWhether this media library should update the metadata of its elements from the web, or not. /// Whether this media library should copy the downloaded metadata into the media library content locations, or not. /// Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. +/// 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. /// Whether the consumption progress of the media library items should be tracked, or not. When absent, the stored value is kept. /// 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. /// The ordered parts of the template describing the structure of the media library on disk. @@ -37,6 +38,7 @@ public record UpdateLibraryCommand( bool CanDownloadMetadataFromWeb, bool ShouldSaveMetadataInMediaDirectories, bool ShouldSkipUnchangedDirectoriesDuringScan, + bool IsContentOnSsd, bool? ShouldTrackConsumptionProgress, int? CompletionThresholdPercentage, LibraryPathTemplatePartDto[]? PathTemplateParts diff --git a/src/Lumina.Application/Core/MediaLibrary/Management/Commands/UpdateLibrary/UpdateLibraryCommandHandler.cs b/src/Lumina.Application/Core/MediaLibrary/Management/Commands/UpdateLibrary/UpdateLibraryCommandHandler.cs index 7ad62473..b77a417c 100644 --- a/src/Lumina.Application/Core/MediaLibrary/Management/Commands/UpdateLibrary/UpdateLibraryCommandHandler.cs +++ b/src/Lumina.Application/Core/MediaLibrary/Management/Commands/UpdateLibrary/UpdateLibraryCommandHandler.cs @@ -169,6 +169,7 @@ public class UpdateLibraryCommandHandler : ICommandHandler ScanId.Create(libraryScan.Id))] diff --git a/src/Lumina.Contracts/Requests/MediaLibrary/Management/AddLibraryRequest.cs b/src/Lumina.Contracts/Requests/MediaLibrary/Management/AddLibraryRequest.cs index 68246693..6daf08ed 100644 --- a/src/Lumina.Contracts/Requests/MediaLibrary/Management/AddLibraryRequest.cs +++ b/src/Lumina.Contracts/Requests/MediaLibrary/Management/AddLibraryRequest.cs @@ -16,6 +16,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.Management; /// Whether this media library should update the metadata of its elements from the web, or not. Optional. /// Whether this media library should copy the downloaded metadata into the media library content locations, or not. Optional. /// Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. Optional. +/// 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. /// 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. /// 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. /// The ordered parts of the template describing the structure of the media library on disk. Optional, the ideal structure of the library type is used when absent. @@ -30,6 +31,7 @@ public record AddLibraryRequest( bool CanDownloadMetadataFromWeb, bool ShouldSaveMetadataInMediaDirectories, bool ShouldSkipUnchangedDirectoriesDuringScan, + bool IsContentOnSsd, bool? ShouldTrackConsumptionProgress, int? CompletionThresholdPercentage, LibraryPathTemplatePartRequest[]? PathTemplateParts diff --git a/src/Lumina.Contracts/Requests/MediaLibrary/Management/UpdateLibraryRequest.cs b/src/Lumina.Contracts/Requests/MediaLibrary/Management/UpdateLibraryRequest.cs index 6e967af2..9d4377f2 100644 --- a/src/Lumina.Contracts/Requests/MediaLibrary/Management/UpdateLibraryRequest.cs +++ b/src/Lumina.Contracts/Requests/MediaLibrary/Management/UpdateLibraryRequest.cs @@ -19,6 +19,7 @@ namespace Lumina.Contracts.Requests.MediaLibrary.Management; /// Whether this media library should update the metadata of its elements from the web, or not. Optional. /// Whether this media library should copy the downloaded metadata into the media library content locations, or not. /// Whether this media library should skip the directories whose contents have not changed since the last scan, during the scan, or not. Optional. +/// 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. /// Whether the consumption progress of the media library items should be tracked, or not. Optional, the stored value is kept when absent. /// 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. /// The ordered parts of the template describing the structure of the media library on disk. Optional, the ideal structure of the library type is used when absent. @@ -35,6 +36,7 @@ public record class UpdateLibraryRequest( bool CanDownloadMetadataFromWeb, bool ShouldSaveMetadataInMediaDirectories, bool ShouldSkipUnchangedDirectoriesDuringScan, + bool IsContentOnSsd, bool? ShouldTrackConsumptionProgress, int? CompletionThresholdPercentage, LibraryPathTemplatePartRequest[]? PathTemplateParts diff --git a/src/Lumina.Contracts/Responses/MediaLibrary/Management/LibraryResponse.cs b/src/Lumina.Contracts/Responses/MediaLibrary/Management/LibraryResponse.cs index 2486f5c2..beb55747 100644 --- a/src/Lumina.Contracts/Responses/MediaLibrary/Management/LibraryResponse.cs +++ b/src/Lumina.Contracts/Responses/MediaLibrary/Management/LibraryResponse.cs @@ -21,6 +21,7 @@ namespace Lumina.Contracts.Responses.MediaLibrary.Management; /// Whether the media library should update the metadata of its elements from the web, or not. /// Whether the media library should copy the downloaded metadata into the media library content locations, or not. /// Whether the media library should skip the directories whose contents have not changed since the last scan, during the scan. +/// 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. /// Whether the consumption progress of the media library items is tracked. /// The percentage of a media library item that must be consumed for its session to be considered completed, when progress tracking is enabled. /// The ordered parts of the template describing the structure of the media library on disk. @@ -39,6 +40,7 @@ public record LibraryResponse( bool CanDownloadMetadataFromWeb, bool ShouldSaveMetadataInMediaDirectories, bool ShouldSkipUnchangedDirectoriesDuringScan, + bool IsContentOnSsd, bool ShouldTrackConsumptionProgress, int? CompletionThresholdPercentage, List PathTemplateParts,