Added some inheritdocs to some DTOs to make it more clear how they function.
This commit is contained in:
parent
ae57267e5b
commit
2a528fdb45
7 changed files with 132 additions and 223 deletions
|
|
@ -6,10 +6,14 @@ namespace API.DTOs.Account;
|
||||||
|
|
||||||
public sealed record UpdateUserDto
|
public sealed record UpdateUserDto
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc cref="API.Entities.AppUser.Id"/>
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.AppUser.UserName"/>
|
||||||
public string Username { get; set; } = default!;
|
public string Username { get; set; } = default!;
|
||||||
|
/// <summary>
|
||||||
/// List of Roles to assign to user. If admin not present, Pleb will be applied.
|
/// List of Roles to assign to user. If admin not present, Pleb will be applied.
|
||||||
/// If admin present, all libraries will be granted access and will ignore those from DTO.
|
/// If admin present, all libraries will be granted access and will ignore those from DTO.
|
||||||
|
/// </summary>
|
||||||
public IList<string> Roles { get; init; } = default!;
|
public IList<string> Roles { get; init; } = default!;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of libraries to grant access to
|
/// A list of libraries to grant access to
|
||||||
|
|
@ -19,8 +23,6 @@ public sealed record UpdateUserDto
|
||||||
/// An Age Rating which will limit the account to seeing everything equal to or below said rating.
|
/// An Age Rating which will limit the account to seeing everything equal to or below said rating.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AgeRestrictionDto AgeRestriction { get; init; } = default!;
|
public AgeRestrictionDto AgeRestriction { get; init; } = default!;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUser.Email"/>
|
||||||
/// Email of the user
|
|
||||||
/// </summary>
|
|
||||||
public string? Email { get; set; } = default!;
|
public string? Email { get; set; } = default!;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,37 +13,24 @@ namespace API.DTOs;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
|
public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.Id"/>
|
||||||
public int Id { get; init; }
|
public int Id { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Range"/>
|
||||||
/// Range of chapters. Chapter 2-4 -> "2-4". Chapter 2 -> "2". If special, will be special name.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>This can be something like 19.HU or Alpha as some comics are like this</remarks>
|
|
||||||
public string Range { get; init; } = default!;
|
public string Range { get; init; } = default!;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Number"/>
|
||||||
/// Smallest number of the Range.
|
|
||||||
/// </summary>
|
|
||||||
[Obsolete("Use MinNumber and MaxNumber instead")]
|
[Obsolete("Use MinNumber and MaxNumber instead")]
|
||||||
public string Number { get; init; } = default!;
|
public string Number { get; init; } = default!;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.MinNumber"/>
|
||||||
/// This may be 0 under the circumstance that the Issue is "Alpha" or other non-standard numbers.
|
|
||||||
/// </summary>
|
|
||||||
public float MinNumber { get; init; }
|
public float MinNumber { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.MaxNumber"/>
|
||||||
public float MaxNumber { get; init; }
|
public float MaxNumber { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.SortOrder"/>
|
||||||
/// The sorting order of the Chapter. Inherits from MinNumber, but can be overridden.
|
|
||||||
/// </summary>
|
|
||||||
public float SortOrder { get; set; }
|
public float SortOrder { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Pages"/>
|
||||||
/// Total number of pages in all MangaFiles
|
|
||||||
/// </summary>
|
|
||||||
public int Pages { get; init; }
|
public int Pages { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.IsSpecial"/>
|
||||||
/// If this Chapter contains files that could only be identified as Series or has Special Identifier from filename
|
|
||||||
/// </summary>
|
|
||||||
public bool IsSpecial { get; init; }
|
public bool IsSpecial { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Title"/>
|
||||||
/// Used for books/specials to display custom title. For non-specials/books, will be set to <see cref="Range"/>
|
|
||||||
/// </summary>
|
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The files that represent this Chapter
|
/// The files that represent this Chapter
|
||||||
|
|
@ -61,46 +48,25 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
/// The last time a chapter was read by current authenticated user
|
/// The last time a chapter was read by current authenticated user
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime LastReadingProgress { get; set; }
|
public DateTime LastReadingProgress { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.CoverImageLocked"/>
|
||||||
/// If the Cover Image is locked for this entity
|
|
||||||
/// </summary>
|
|
||||||
public bool CoverImageLocked { get; set; }
|
public bool CoverImageLocked { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.VolumeId"/>
|
||||||
/// Volume Id this Chapter belongs to
|
|
||||||
/// </summary>
|
|
||||||
public int VolumeId { get; init; }
|
public int VolumeId { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.CreatedUtc"/>
|
||||||
/// When chapter was created
|
|
||||||
/// </summary>
|
|
||||||
public DateTime CreatedUtc { get; set; }
|
public DateTime CreatedUtc { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.LastModifiedUtc"/>
|
||||||
public DateTime LastModifiedUtc { get; set; }
|
public DateTime LastModifiedUtc { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Created"/>
|
||||||
/// When chapter was created in local server time
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>This is required for Tachiyomi Extension</remarks>
|
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.ReleaseDate"/>
|
||||||
/// When the chapter was released.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Metadata field</remarks>
|
|
||||||
public DateTime ReleaseDate { get; init; }
|
public DateTime ReleaseDate { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.TitleName"/>
|
||||||
/// Title of the Chapter/Issue
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Metadata field</remarks>
|
|
||||||
public string TitleName { get; set; } = default!;
|
public string TitleName { get; set; } = default!;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Summary"/>
|
||||||
/// Summary of the Chapter
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>This is not set normally, only for Series Detail</remarks>
|
|
||||||
public string Summary { get; init; } = default!;
|
public string Summary { get; init; } = default!;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.AgeRating"/>
|
||||||
/// Age Rating for the issue/chapter
|
|
||||||
/// </summary>
|
|
||||||
public AgeRating AgeRating { get; init; }
|
public AgeRating AgeRating { get; init; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.WordCount"/>
|
||||||
/// Total words in a Chapter (books only)
|
|
||||||
/// </summary>
|
|
||||||
public long WordCount { get; set; } = 0L;
|
public long WordCount { get; set; } = 0L;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Formatted Volume title ie) Volume 2.
|
/// Formatted Volume title ie) Volume 2.
|
||||||
|
|
@ -113,14 +79,9 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
public int MaxHoursToRead { get; set; }
|
public int MaxHoursToRead { get; set; }
|
||||||
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
|
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
|
||||||
public float AvgHoursToRead { get; set; }
|
public float AvgHoursToRead { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.WebLinks"/>
|
||||||
/// Comma-separated link of urls to external services that have some relation to the Chapter
|
|
||||||
/// </summary>
|
|
||||||
public string WebLinks { get; set; }
|
public string WebLinks { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.ISBN"/>
|
||||||
/// ISBN-13 (usually) of the Chapter
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>This is guaranteed to be Valid</remarks>
|
|
||||||
public string ISBN { get; set; }
|
public string ISBN { get; set; }
|
||||||
|
|
||||||
#region Metadata
|
#region Metadata
|
||||||
|
|
@ -146,51 +107,60 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ICollection<TagDto> Tags { get; set; } = new List<TagDto>();
|
public ICollection<TagDto> Tags { get; set; } = new List<TagDto>();
|
||||||
public PublicationStatus PublicationStatus { get; set; }
|
public PublicationStatus PublicationStatus { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Language"/>
|
||||||
/// Language for the Chapter/Issue
|
|
||||||
/// </summary>
|
|
||||||
public string? Language { get; set; }
|
public string? Language { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.Count"/>
|
||||||
/// Number in the TotalCount of issues
|
|
||||||
/// </summary>
|
|
||||||
public int Count { get; set; }
|
public int Count { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.TotalCount"/>
|
||||||
/// Total number of issues for the series
|
|
||||||
/// </summary>
|
|
||||||
public int TotalCount { get; set; }
|
public int TotalCount { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.LanguageLocked"/>
|
||||||
public bool LanguageLocked { get; set; }
|
public bool LanguageLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.SummaryLocked"/>
|
||||||
public bool SummaryLocked { get; set; }
|
public bool SummaryLocked { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Chapter.AgeRatingLocked"/>
|
||||||
/// Locked by user so metadata updates from scan loop will not override AgeRating
|
|
||||||
/// </summary>
|
|
||||||
public bool AgeRatingLocked { get; set; }
|
public bool AgeRatingLocked { get; set; }
|
||||||
/// <summary>
|
|
||||||
/// Locked by user so metadata updates from scan loop will not override PublicationStatus
|
|
||||||
/// </summary>
|
|
||||||
public bool PublicationStatusLocked { get; set; }
|
public bool PublicationStatusLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.GenresLocked"/>
|
||||||
public bool GenresLocked { get; set; }
|
public bool GenresLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.TagsLocked"/>
|
||||||
public bool TagsLocked { get; set; }
|
public bool TagsLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.WriterLocked"/>
|
||||||
public bool WriterLocked { get; set; }
|
public bool WriterLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.CharacterLocked"/>
|
||||||
public bool CharacterLocked { get; set; }
|
public bool CharacterLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.ColoristLocked"/>
|
||||||
public bool ColoristLocked { get; set; }
|
public bool ColoristLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.EditorLocked"/>
|
||||||
public bool EditorLocked { get; set; }
|
public bool EditorLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.InkerLocked"/>
|
||||||
public bool InkerLocked { get; set; }
|
public bool InkerLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.ImprintLocked"/>
|
||||||
public bool ImprintLocked { get; set; }
|
public bool ImprintLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.LettererLocked"/>
|
||||||
public bool LettererLocked { get; set; }
|
public bool LettererLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.PencillerLocked"/>
|
||||||
public bool PencillerLocked { get; set; }
|
public bool PencillerLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.PublisherLocked"/>
|
||||||
public bool PublisherLocked { get; set; }
|
public bool PublisherLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.TranslatorLocked"/>
|
||||||
public bool TranslatorLocked { get; set; }
|
public bool TranslatorLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.TeamLocked"/>
|
||||||
public bool TeamLocked { get; set; }
|
public bool TeamLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.LocationLocked"/>
|
||||||
public bool LocationLocked { get; set; }
|
public bool LocationLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.CoverArtistLocked"/>
|
||||||
public bool CoverArtistLocked { get; set; }
|
public bool CoverArtistLocked { get; set; }
|
||||||
public bool ReleaseYearLocked { get; set; }
|
public bool ReleaseYearLocked { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public string CoverImage { get; set; }
|
/// <inheritdoc cref="API.Entities.Chapter.CoverImage"/>
|
||||||
public string PrimaryColor { get; set; } = string.Empty;
|
public string? CoverImage { get; set; }
|
||||||
public string SecondaryColor { get; set; } = string.Empty;
|
/// <inheritdoc cref="API.Entities.Chapter.PrimaryColor"/>
|
||||||
|
public string? PrimaryColor { get; set; } = string.Empty;
|
||||||
|
/// <inheritdoc cref="API.Entities.Chapter.SecondaryColor"/>
|
||||||
|
public string? SecondaryColor { get; set; } = string.Empty;
|
||||||
|
|
||||||
public void ResetColorScape()
|
public void ResetColorScape()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,19 @@ namespace API.DTOs.CollectionTags;
|
||||||
[Obsolete("Use AppUserCollectionDto")]
|
[Obsolete("Use AppUserCollectionDto")]
|
||||||
public sealed record CollectionTagDto
|
public sealed record CollectionTagDto
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc cref="API.Entities.CollectionTag.Id"/>
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.CollectionTag.Title"/>
|
||||||
public string Title { get; set; } = default!;
|
public string Title { get; set; } = default!;
|
||||||
|
/// <inheritdoc cref="API.Entities.CollectionTag.Summary"/>
|
||||||
public string Summary { get; set; } = default!;
|
public string Summary { get; set; } = default!;
|
||||||
|
/// <inheritdoc cref="API.Entities.CollectionTag.Promoted"/>
|
||||||
public bool Promoted { get; set; }
|
public bool Promoted { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cover image string. This is used on Frontend to show or hide the Cover Image
|
/// The cover image string. This is used on Frontend to show or hide the Cover Image
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <inheritdoc cref="API.Entities.CollectionTag.CoverImage"/>
|
||||||
public string CoverImage { get; set; } = default!;
|
public string CoverImage { get; set; } = default!;
|
||||||
|
/// <inheritdoc cref="API.Entities.CollectionTag.CoverImageLocked"/>
|
||||||
public bool CoverImageLocked { get; set; }
|
public bool CoverImageLocked { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ public sealed record ReadingListDto : IHasCoverImage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? CoverImage { get; set; } = string.Empty;
|
public string? CoverImage { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string PrimaryColor { get; set; } = string.Empty;
|
public string? PrimaryColor { get; set; } = string.Empty;
|
||||||
public string SecondaryColor { get; set; } = string.Empty;
|
public string? SecondaryColor { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of Items in the Reading List
|
/// Number of Items in the Reading List
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,19 @@ namespace API.DTOs;
|
||||||
|
|
||||||
public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
|
public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.Id"/>
|
||||||
public int Id { get; init; }
|
public int Id { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.Name"/>
|
||||||
public string? Name { get; init; }
|
public string? Name { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.OriginalName"/>
|
||||||
public string? OriginalName { get; init; }
|
public string? OriginalName { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.LocalizedName"/>
|
||||||
public string? LocalizedName { get; init; }
|
public string? LocalizedName { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.SortName"/>
|
||||||
public string? SortName { get; init; }
|
public string? SortName { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.Pages"/>
|
||||||
public int Pages { get; init; }
|
public int Pages { get; init; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.CoverImageLocked"/>
|
||||||
public bool CoverImageLocked { get; set; }
|
public bool CoverImageLocked { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sum of pages read from linked Volumes. Calculated at API-time.
|
/// Sum of pages read from linked Volumes. Calculated at API-time.
|
||||||
|
|
@ -22,9 +29,7 @@ public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
/// DateTime representing last time the series was Read. Calculated at API-time.
|
/// DateTime representing last time the series was Read. Calculated at API-time.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime LatestReadDate { get; set; }
|
public DateTime LatestReadDate { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.LastChapterAdded"/>
|
||||||
/// DateTime representing last time a chapter was added to the Series
|
|
||||||
/// </summary>
|
|
||||||
public DateTime LastChapterAdded { get; set; }
|
public DateTime LastChapterAdded { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Rating from logged in user. Calculated at API-time.
|
/// Rating from logged in user. Calculated at API-time.
|
||||||
|
|
@ -35,17 +40,19 @@ public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasUserRated { get; set; }
|
public bool HasUserRated { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.Format"/>
|
||||||
public MangaFormat Format { get; set; }
|
public MangaFormat Format { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.Created"/>
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
|
|
||||||
public bool NameLocked { get; set; }
|
/// <inheritdoc cref="API.Entities.Series.SortNameLocked"/>
|
||||||
public bool SortNameLocked { get; set; }
|
public bool SortNameLocked { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.LocalizedNameLocked"/>
|
||||||
public bool LocalizedNameLocked { get; set; }
|
public bool LocalizedNameLocked { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.WordCount"/>
|
||||||
/// Total number of words for the series. Only applies to epubs.
|
|
||||||
/// </summary>
|
|
||||||
public long WordCount { get; set; }
|
public long WordCount { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.LibraryId"/>
|
||||||
public int LibraryId { get; set; }
|
public int LibraryId { get; set; }
|
||||||
public string LibraryName { get; set; } = default!;
|
public string LibraryName { get; set; } = default!;
|
||||||
/// <inheritdoc cref="IHasReadTimeEstimate.MinHoursToRead"/>
|
/// <inheritdoc cref="IHasReadTimeEstimate.MinHoursToRead"/>
|
||||||
|
|
@ -54,33 +61,25 @@ public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
public int MaxHoursToRead { get; set; }
|
public int MaxHoursToRead { get; set; }
|
||||||
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
|
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
|
||||||
public float AvgHoursToRead { get; set; }
|
public float AvgHoursToRead { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.FolderPath"/>
|
||||||
/// The highest level folder for this Series
|
|
||||||
/// </summary>
|
|
||||||
public string FolderPath { get; set; } = default!;
|
public string FolderPath { get; set; } = default!;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.LowestFolderPath"/>
|
||||||
/// Lowest path (that is under library root) that contains all files for the series.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks><see cref="Services.Tasks.Scanner.Parser.Parser.NormalizePath"/> must be used before setting</remarks>
|
|
||||||
public string? LowestFolderPath { get; set; }
|
public string? LowestFolderPath { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.LastFolderScanned"/>
|
||||||
/// The last time the folder for this series was scanned
|
|
||||||
/// </summary>
|
|
||||||
public DateTime LastFolderScanned { get; set; }
|
public DateTime LastFolderScanned { get; set; }
|
||||||
#region KavitaPlus
|
#region KavitaPlus
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.DontMatch"/>
|
||||||
/// Do not match the series with any external Metadata service. This will automatically opt it out of scrobbling.
|
|
||||||
/// </summary>
|
|
||||||
public bool DontMatch { get; set; }
|
public bool DontMatch { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.Series.IsBlacklisted"/>
|
||||||
/// If the series was unable to match, it will be blacklisted until a manual metadata match overrides it
|
|
||||||
/// </summary>
|
|
||||||
public bool IsBlacklisted { get; set; }
|
public bool IsBlacklisted { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.CoverImage"/>
|
||||||
public string? CoverImage { get; set; }
|
public string? CoverImage { get; set; }
|
||||||
public string PrimaryColor { get; set; } = string.Empty;
|
/// <inheritdoc cref="API.Entities.Series.PrimaryColor"/>
|
||||||
public string SecondaryColor { get; set; } = string.Empty;
|
public string? PrimaryColor { get; set; } = string.Empty;
|
||||||
|
/// <inheritdoc cref="API.Entities.Series.SecondaryColor"/>
|
||||||
|
public string? SecondaryColor { get; set; } = string.Empty;
|
||||||
|
|
||||||
public void ResetColorScape()
|
public void ResetColorScape()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,102 +9,59 @@ namespace API.DTOs;
|
||||||
|
|
||||||
public sealed record UserPreferencesDto
|
public sealed record UserPreferencesDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.ReadingDirection"/>
|
||||||
/// Manga Reader Option: What direction should the next/prev page buttons go
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public ReadingDirection ReadingDirection { get; set; }
|
public ReadingDirection ReadingDirection { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.ScalingOption"/>
|
||||||
/// Manga Reader Option: How should the image be scaled to screen
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public ScalingOption ScalingOption { get; set; }
|
public ScalingOption ScalingOption { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.PageSplitOption"/>
|
||||||
/// Manga Reader Option: Which side of a split image should we show first
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public PageSplitOption PageSplitOption { get; set; }
|
public PageSplitOption PageSplitOption { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.ReaderMode"/>
|
||||||
/// Manga Reader Option: How the manga reader should perform paging or reading of the file
|
|
||||||
/// <example>
|
|
||||||
/// Webtoon uses scrolling to page, LeftRight uses paging by clicking left/right side of reader, UpDown uses paging
|
|
||||||
/// by clicking top/bottom sides of reader.
|
|
||||||
/// </example>
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public ReaderMode ReaderMode { get; set; }
|
public ReaderMode ReaderMode { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.LayoutMode"/>
|
||||||
/// Manga Reader Option: How many pages to display in the reader at once
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public LayoutMode LayoutMode { get; set; }
|
public LayoutMode LayoutMode { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.EmulateBook"/>
|
||||||
/// Manga Reader Option: Emulate a book by applying a shadow effect on the pages
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool EmulateBook { get; set; }
|
public bool EmulateBook { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BackgroundColor"/>
|
||||||
/// Manga Reader Option: Background color of the reader
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public string BackgroundColor { get; set; } = "#000000";
|
public string BackgroundColor { get; set; } = "#000000";
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.SwipeToPaginate"/>
|
||||||
/// Manga Reader Option: Should swiping trigger pagination
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool SwipeToPaginate { get; set; }
|
public bool SwipeToPaginate { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.AutoCloseMenu"/>
|
||||||
/// Manga Reader Option: Allow the menu to close after 6 seconds without interaction
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool AutoCloseMenu { get; set; }
|
public bool AutoCloseMenu { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.ShowScreenHints"/>
|
||||||
/// Manga Reader Option: Show screen hints to the user on some actions, ie) pagination direction change
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool ShowScreenHints { get; set; } = true;
|
public bool ShowScreenHints { get; set; } = true;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.AllowAutomaticWebtoonReaderDetection"/>
|
||||||
/// Manga Reader Option: Allow Automatic Webtoon detection
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool AllowAutomaticWebtoonReaderDetection { get; set; }
|
public bool AllowAutomaticWebtoonReaderDetection { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderMargin"/>
|
||||||
/// <summary>
|
|
||||||
/// Book Reader Option: Override extra Margin
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public int BookReaderMargin { get; set; }
|
public int BookReaderMargin { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderLineSpacing"/>
|
||||||
/// Book Reader Option: Override line-height
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public int BookReaderLineSpacing { get; set; }
|
public int BookReaderLineSpacing { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderFontSize"/>
|
||||||
/// Book Reader Option: Override font size
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public int BookReaderFontSize { get; set; }
|
public int BookReaderFontSize { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderFontFamily"/>
|
||||||
/// Book Reader Option: Maps to the default Kavita font-family (inherit) or an override
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public string BookReaderFontFamily { get; set; } = null!;
|
public string BookReaderFontFamily { get; set; } = null!;
|
||||||
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderTapToPaginate"/>
|
||||||
/// <summary>
|
|
||||||
/// Book Reader Option: Allows tapping on side of screens to paginate
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool BookReaderTapToPaginate { get; set; }
|
public bool BookReaderTapToPaginate { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderReadingDirection"/>
|
||||||
/// Book Reader Option: What direction should the next/prev page buttons go
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public ReadingDirection BookReaderReadingDirection { get; set; }
|
public ReadingDirection BookReaderReadingDirection { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderWritingStyle"/>
|
||||||
/// <summary>
|
|
||||||
/// Book Reader Option: What writing style should be used, horizontal or vertical.
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public WritingStyle BookReaderWritingStyle { get; set; }
|
public WritingStyle BookReaderWritingStyle { get; set; }
|
||||||
|
|
||||||
|
|
@ -116,79 +73,46 @@ public sealed record UserPreferencesDto
|
||||||
public SiteThemeDto? Theme { get; set; }
|
public SiteThemeDto? Theme { get; set; }
|
||||||
|
|
||||||
[Required] public string BookReaderThemeName { get; set; } = null!;
|
[Required] public string BookReaderThemeName { get; set; } = null!;
|
||||||
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderLayoutMode"/>
|
||||||
[Required]
|
[Required]
|
||||||
public BookPageLayoutMode BookReaderLayoutMode { get; set; }
|
public BookPageLayoutMode BookReaderLayoutMode { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderImmersiveMode"/>
|
||||||
/// Book Reader Option: A flag that hides the menu-ing system behind a click on the screen. This should be used with tap to paginate, but the app doesn't enforce this.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Defaults to false</remarks>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool BookReaderImmersiveMode { get; set; } = false;
|
public bool BookReaderImmersiveMode { get; set; } = false;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.GlobalPageLayoutMode"/>
|
||||||
/// Global Site Option: If the UI should layout items as Cards or List items
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Defaults to Cards</remarks>
|
|
||||||
[Required]
|
[Required]
|
||||||
public PageLayoutMode GlobalPageLayoutMode { get; set; } = PageLayoutMode.Cards;
|
public PageLayoutMode GlobalPageLayoutMode { get; set; } = PageLayoutMode.Cards;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.BlurUnreadSummaries"/>
|
||||||
/// UI Site Global Setting: If unread summaries should be blurred until expanded or unless user has read it already
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>Defaults to false</remarks>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool BlurUnreadSummaries { get; set; } = false;
|
public bool BlurUnreadSummaries { get; set; } = false;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.PromptForDownloadSize"/>
|
||||||
/// UI Site Global Setting: Should Kavita prompt user to confirm downloads that are greater than 100 MB.
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool PromptForDownloadSize { get; set; } = true;
|
public bool PromptForDownloadSize { get; set; } = true;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.NoTransitions"/>
|
||||||
/// UI Site Global Setting: Should Kavita disable CSS transitions
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool NoTransitions { get; set; } = false;
|
public bool NoTransitions { get; set; } = false;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.CollapseSeriesRelationships"/>
|
||||||
/// When showing series, only parent series or series with no relationships will be returned
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool CollapseSeriesRelationships { get; set; } = false;
|
public bool CollapseSeriesRelationships { get; set; } = false;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.ShareReviews"/>
|
||||||
/// UI Site Global Setting: Should series reviews be shared with all users in the server
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool ShareReviews { get; set; } = false;
|
public bool ShareReviews { get; set; } = false;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.Locale"/>
|
||||||
/// UI Site Global Setting: The language locale that should be used for the user
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Locale { get; set; }
|
public string Locale { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.PdfTheme"/>
|
||||||
/// PDF Reader: Theme of the Reader
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public PdfTheme PdfTheme { get; set; } = PdfTheme.Dark;
|
public PdfTheme PdfTheme { get; set; } = PdfTheme.Dark;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.PdfScrollMode"/>
|
||||||
/// PDF Reader: Scroll mode of the reader
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public PdfScrollMode PdfScrollMode { get; set; } = PdfScrollMode.Vertical;
|
public PdfScrollMode PdfScrollMode { get; set; } = PdfScrollMode.Vertical;
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.PdfSpreadMode"/>
|
||||||
/// PDF Reader: Layout Mode of the reader
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public PdfLayoutMode PdfLayoutMode { get; set; } = PdfLayoutMode.Multiple;
|
|
||||||
/// <summary>
|
|
||||||
/// PDF Reader: Spread Mode of the reader
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
[Required]
|
||||||
public PdfSpreadMode PdfSpreadMode { get; set; } = PdfSpreadMode.None;
|
public PdfSpreadMode PdfSpreadMode { get; set; } = PdfSpreadMode.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.AniListScrobblingEnabled"/>
|
||||||
/// Kavita+: Should this account have Scrobbling enabled for AniList
|
|
||||||
/// </summary>
|
|
||||||
public bool AniListScrobblingEnabled { get; set; }
|
public bool AniListScrobblingEnabled { get; set; }
|
||||||
/// <summary>
|
/// <inheritdoc cref="API.Entities.AppUserPreferences.WantToReadSync"/>
|
||||||
/// Kavita+: Should this account have Want to Read Sync enabled
|
|
||||||
/// </summary>
|
|
||||||
public bool WantToReadSync { get; set; }
|
public bool WantToReadSync { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using API.Entities;
|
using API.Entities;
|
||||||
using API.Entities.Interfaces;
|
using API.Entities.Interfaces;
|
||||||
|
|
@ -10,12 +9,13 @@ namespace API.DTOs;
|
||||||
|
|
||||||
public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
|
public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.Id"/>
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
/// <inheritdoc cref="Volume.MinNumber"/>
|
/// <inheritdoc cref="API.Entities.Volume.MinNumber"/>
|
||||||
public float MinNumber { get; set; }
|
public float MinNumber { get; set; }
|
||||||
/// <inheritdoc cref="Volume.MaxNumber"/>
|
/// <inheritdoc cref="API.Entities.Volume.MaxNumber"/>
|
||||||
public float MaxNumber { get; set; }
|
public float MaxNumber { get; set; }
|
||||||
/// <inheritdoc cref="Volume.Name"/>
|
/// <inheritdoc cref="API.Entities.Volume.Name"/>
|
||||||
public string Name { get; set; } = default!;
|
public string Name { get; set; } = default!;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This will map to MinNumber. Number was removed in v0.7.13.8/v0.7.14
|
/// This will map to MinNumber. Number was removed in v0.7.13.8/v0.7.14
|
||||||
|
|
@ -24,17 +24,21 @@ public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
public int Number { get; set; }
|
public int Number { get; set; }
|
||||||
public int Pages { get; set; }
|
public int Pages { get; set; }
|
||||||
public int PagesRead { get; set; }
|
public int PagesRead { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.LastModifiedUtc"/>
|
||||||
public DateTime LastModifiedUtc { get; set; }
|
public DateTime LastModifiedUtc { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.CreatedUtc"/>
|
||||||
public DateTime CreatedUtc { get; set; }
|
public DateTime CreatedUtc { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When chapter was created in local server time
|
/// When chapter was created in local server time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>This is required for Tachiyomi Extension</remarks>
|
/// <remarks>This is required for Tachiyomi Extension</remarks>
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.Created"/>
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When chapter was last modified in local server time
|
/// When chapter was last modified in local server time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>This is required for Tachiyomi Extension</remarks>
|
/// <remarks>This is required for Tachiyomi Extension</remarks>
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.LastModified"/>
|
||||||
public DateTime LastModified { get; set; }
|
public DateTime LastModified { get; set; }
|
||||||
public int SeriesId { get; set; }
|
public int SeriesId { get; set; }
|
||||||
public ICollection<ChapterDto> Chapters { get; set; } = new List<ChapterDto>();
|
public ICollection<ChapterDto> Chapters { get; set; } = new List<ChapterDto>();
|
||||||
|
|
@ -64,10 +68,14 @@ public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
|
||||||
return MinNumber.Is(Parser.SpecialVolumeNumber);
|
return MinNumber.Is(Parser.SpecialVolumeNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.CoverImage"/>
|
||||||
public string CoverImage { get; set; }
|
public string CoverImage { get; set; }
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.CoverImageLocked"/>
|
||||||
private bool CoverImageLocked { get; set; }
|
private bool CoverImageLocked { get; set; }
|
||||||
public string PrimaryColor { get; set; } = string.Empty;
|
/// <inheritdoc cref="API.Entities.Volume.PrimaryColor"/>
|
||||||
public string SecondaryColor { get; set; } = string.Empty;
|
public string? PrimaryColor { get; set; } = string.Empty;
|
||||||
|
/// <inheritdoc cref="API.Entities.Volume.SecondaryColor"/>
|
||||||
|
public string? SecondaryColor { get; set; } = string.Empty;
|
||||||
|
|
||||||
public void ResetColorScape()
|
public void ResetColorScape()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue