Files
Nemera/src/Lumina.Presentation.Web/Common/DTO/Libraries/LibraryDto.cs
T

110 lines
5.2 KiB
C#

#region ========================================================================= USING =====================================================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
#endregion
namespace Lumina.Presentation.Web.Common.DTO.Libraries;
/// <summary>
/// Data transfer object for a library element.
/// </summary>
[DebuggerDisplay("Title: {Title}")]
public class LibraryDto
{
/// <summary>
/// Gets or sets the unique identifier of the media library.
/// </summary>
public Guid? Id { get; set; }
/// <summary>
/// Gets or sets the title of the library.
/// </summary>
public string? Title { get; set; }
/// <summary>
/// Gets or sets the type of the library.
/// </summary>
public string? LibraryType { get; set; }
/// <summary>
/// Gets or sets the path of the image file used as the cover for the library.
/// </summary>
public string? CoverImage { get; set; }
/// <summary>
/// Gets or sets the collection of directories that contain the library files.
/// </summary>
public List<string> ContentLocations { get; set; } = [];
/// <summary>
/// Gets or sets whether this media library is enabled or not. A disabled media library is never shown or changed.
/// </summary>
public bool IsEnabled { get; set; } = true;
/// <summary>
/// Gets or sets whether this media library is locked or not. A locked media library is displayed, but is never changed or updated.
/// </summary>
public bool IsLocked { get; set; } = false;
/// <summary>
/// Gets or sets whether this media library should update the metadata of its elements from the web, or not.
/// </summary>
public bool CanDownloadMetadataFromWeb { get; set; } = true;
/// <summary>
/// Gets or sets whether this media library should copy the downloaded metadata into the media library content locations, or not.
/// </summary>
public bool ShouldSaveMetadataInMediaDirectories { get; set; } = false;
/// <summary>
/// Gets or sets whether this media library should skip the directories whose contents have not changed since the last scan, during the scan. This is an opt-in setting, because it relies on directory metadata,
/// which does not change when the contents of an existing file are edited, and such edits could be missed while this setting is enabled.
/// </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>
public bool IsContentOnSsd { get; set; } = false;
/// <summary>
/// Gets or sets whether the consumption progress of the media library items is tracked, or not. When absent, the default of the library type is used on create, and the stored value is kept on update.
/// </summary>
public bool? ShouldTrackConsumptionProgress { get; set; }
/// <summary>
/// Gets or sets 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 create,
/// and the stored value is kept on update.
/// </summary>
public int? CompletionThresholdPercentage { get; set; }
/// <summary>
/// Gets or sets the ordered parts of the template describing the structure of the media library on disk.
/// </summary>
public List<LibraryPathTemplatePartDto> PathTemplateParts { get; set; } = [];
/// <summary>
/// Gets or sets the metadata providers of the media library, in the order in which they are tried, and whether each one is enabled. When absent, the providers are configured
/// with their defaults on create, and on update the stored configurations are kept, or reconciled with the library type when it changes.
/// </summary>
public List<LibraryProviderSelectionDto>? MetadataProviders { get; set; }
/// <summary>
/// Gets or sets the artwork providers of the media library, in the order in which they are tried, and whether each one is enabled. When absent, the providers are configured
/// with their defaults on create, and on update the stored configurations are kept, or reconciled with the library type when it changes.
/// </summary>
public List<LibraryProviderSelectionDto>? ArtworkProviders { get; set; }
/// <summary>
/// Gets or sets the book readers of the media library, and whether each one is enabled. When absent, the readers are configured with their defaults on create, and on update
/// the stored configurations are kept, or reconciled with the library type when it changes.
/// </summary>
public List<LibraryProviderSelectionDto>? BookReaders { get; set; }
}