mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-01 23:02:35 -05:00
Co-authored-by: KindlyFire <10267586+kindlyfire@users.noreply.github.com> Co-authored-by: Hosted Weblate <hosted@weblate.org> Co-authored-by: Adam Havránek <adamhavra@seznam.cz> Co-authored-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com> Co-authored-by: Alexey <lewadedun@gmail.com> Co-authored-by: Anon Bitardov <timurvolga23+weblate@gmail.com> Co-authored-by: Ferran <ferrancette@gmail.com> Co-authored-by: Gneb <goozi12345@gmail.com> Co-authored-by: Robin Stolpe <robinstolpe@slashmad.com> Co-authored-by: 안세훈 <on9686@gmail.com> Co-authored-by: Tijl Van den Brugghen <contact@tijlvdb.me>
90 lines
3.3 KiB
C#
90 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using API.Entities;
|
|
using API.Entities.Enums;
|
|
|
|
namespace API.DTOs;
|
|
#nullable enable
|
|
|
|
/// <summary>
|
|
/// This is a LibraryDto that non-admins can resolve that has the core information they need
|
|
/// </summary>
|
|
public record LiteLibraryDto
|
|
{
|
|
public int Id { get; init; }
|
|
public string? Name { get; init; }
|
|
public LibraryType Type { get; init; }
|
|
}
|
|
|
|
public sealed record LibraryDto : LiteLibraryDto
|
|
{
|
|
/// <summary>
|
|
/// Last time Library was scanned
|
|
/// </summary>
|
|
public DateTime LastScanned { get; init; }
|
|
/// <summary>
|
|
/// An optional Cover Image or null
|
|
/// </summary>
|
|
public string? CoverImage { get; init; }
|
|
/// <summary>
|
|
/// If Folder Watching is enabled for this library
|
|
/// </summary>
|
|
public bool FolderWatching { get; set; } = true;
|
|
/// <summary>
|
|
/// Include Library series on Dashboard Streams
|
|
/// </summary>
|
|
public bool IncludeInDashboard { get; set; } = true;
|
|
/// <summary>
|
|
/// Include Library series on Recommended Streams
|
|
/// </summary>
|
|
public bool IncludeInRecommended { get; set; } = true;
|
|
/// <summary>
|
|
/// Should this library create and manage collections from Metadata
|
|
/// </summary>
|
|
public bool ManageCollections { get; set; } = true;
|
|
/// <summary>
|
|
/// Should this library create and manage reading lists from Metadata
|
|
/// </summary>
|
|
public bool ManageReadingLists { get; set; } = true;
|
|
/// <summary>
|
|
/// Include library series in Search
|
|
/// </summary>
|
|
public bool IncludeInSearch { get; set; } = true;
|
|
/// <summary>
|
|
/// Should this library allow Scrobble events to emit from it
|
|
/// </summary>
|
|
/// <remarks>Scrobbling requires a valid LicenseKey</remarks>
|
|
public bool AllowScrobbling { get; set; } = true;
|
|
public ICollection<string> Folders { get; init; } = new List<string>();
|
|
/// <summary>
|
|
/// When showing series, only parent series or series with no relationships will be returned
|
|
/// </summary>
|
|
public bool CollapseSeriesRelationships { get; set; } = false;
|
|
/// <summary>
|
|
/// The types of file type groups the library will scan for
|
|
/// </summary>
|
|
public ICollection<FileTypeGroup> LibraryFileTypes { get; set; }
|
|
/// <summary>
|
|
/// A set of globs that will exclude matching content from being scanned
|
|
/// </summary>
|
|
public ICollection<string> ExcludePatterns { get; set; }
|
|
/// <summary>
|
|
/// Allow any series within this Library to download metadata.
|
|
/// </summary>
|
|
/// <remarks>This does not exclude the library from being linked to wrt Series Relationships</remarks>
|
|
/// <remarks>Requires a valid LicenseKey</remarks>
|
|
public bool AllowMetadataMatching { get; set; } = true;
|
|
/// <summary>
|
|
/// Allow Kavita to read metadata (ComicInfo.xml, Epub, PDF)
|
|
/// </summary>
|
|
public bool EnableMetadata { get; set; } = true;
|
|
/// <summary>
|
|
/// Should Kavita remove sort articles "The" for the sort name
|
|
/// </summary>
|
|
public bool RemovePrefixForSortName { get; set; } = false;
|
|
/// <inheritdoc cref="Library.InheritWebLinksFromFirstChapter"/>
|
|
public bool InheritWebLinksFromFirstChapter { get; init; }
|
|
/// <inheritdoc cref="Library.DefaultLanguage"/>
|
|
public string DefaultLanguage { get; init; }
|
|
}
|