mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Propagates the SSD content setting through application commands and contracts
Carries the setting from the API requests through the application commands and mappings, and returns it in the library response.
This commit is contained in:
1 parent
6eac3d578e
commit
bcb5c4391c
11 files changed
+17
No files matched your search
+1
@@ -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()
|
||||
|
||||
@@ -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))]
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
@@ -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()
|
||||
|
||||
+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="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>
|
||||
/// <param name="PathTemplateParts">The ordered parts of the template describing the structure of the media library on disk.</param>
|
||||
@@ -32,6 +33,7 @@ public record AddLibraryCommand(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
LibraryPathTemplatePartDto[]? PathTemplateParts
|
||||
|
||||
+1
@@ -147,6 +147,7 @@ public class AddLibraryCommandHandler : ICommandHandler<AddLibraryCommand, Resul
|
||||
command.CanDownloadMetadataFromWeb,
|
||||
command.ShouldSaveMetadataInMediaDirectories,
|
||||
command.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
command.IsContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplateResult.Value,
|
||||
[]
|
||||
|
||||
+2
@@ -21,6 +21,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="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>
|
||||
/// <param name="PathTemplateParts">The ordered parts of the template describing the structure of the media library on disk.</param>
|
||||
@@ -37,6 +38,7 @@ public record UpdateLibraryCommand(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
LibraryPathTemplatePartDto[]? PathTemplateParts
|
||||
|
||||
+1
@@ -169,6 +169,7 @@ public class UpdateLibraryCommandHandler : ICommandHandler<UpdateLibraryCommand,
|
||||
command.CanDownloadMetadataFromWeb,
|
||||
command.ShouldSaveMetadataInMediaDirectories,
|
||||
command.ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
command.IsContentOnSsd,
|
||||
consumptionSettings,
|
||||
pathTemplateResult.Value,
|
||||
[.. getLibraryResult.Value.LibraryScans.Select(libraryScan => ScanId.Create(libraryScan.Id))]
|
||||
|
||||
@@ -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. Optional.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not. Optional.</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. Optional.</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. Optional.</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>
|
||||
/// <param name="PathTemplateParts">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.</param>
|
||||
@@ -30,6 +31,7 @@ public record AddLibraryRequest(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
LibraryPathTemplatePartRequest[]? PathTemplateParts
|
||||
|
||||
@@ -19,6 +19,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. Optional.</param>
|
||||
/// <param name="ShouldSaveMetadataInMediaDirectories">Whether this media library should copy the downloaded metadata into the media library content locations, or not.
|
||||
/// <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. Optional.</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. Optional.</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>
|
||||
/// <param name="PathTemplateParts">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.</param>
|
||||
@@ -35,6 +36,7 @@ public record class UpdateLibraryRequest(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool? ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
LibraryPathTemplatePartRequest[]? PathTemplateParts
|
||||
|
||||
@@ -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="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>
|
||||
/// <param name="PathTemplateParts">The ordered parts of the template describing the structure of the media library on disk.</param>
|
||||
@@ -39,6 +40,7 @@ public record LibraryResponse(
|
||||
bool CanDownloadMetadataFromWeb,
|
||||
bool ShouldSaveMetadataInMediaDirectories,
|
||||
bool ShouldSkipUnchangedDirectoriesDuringScan,
|
||||
bool IsContentOnSsd,
|
||||
bool ShouldTrackConsumptionProgress,
|
||||
int? CompletionThresholdPercentage,
|
||||
List<LibraryPathTemplatePartResponse> PathTemplateParts,
|
||||
|
||||
Reference in new issue
Block a user