More Metadata Stuff (#3537)
This commit is contained in:
parent
8d3dcc637e
commit
53b13da0c9
34 changed files with 4123 additions and 129 deletions
|
@ -1,8 +1,25 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using API.Entities.Enums;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents which field that can be written to as an override when already locked
|
||||
/// </summary>
|
||||
public enum MetadataSettingField
|
||||
{
|
||||
Summary = 1,
|
||||
PublicationStatus = 2,
|
||||
StartDate = 3,
|
||||
Genres = 4,
|
||||
Tags = 5,
|
||||
LocalizedName = 6,
|
||||
Covers = 7,
|
||||
AgeRating = 8,
|
||||
People = 9
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the metadata settings for Kavita+
|
||||
/// </summary>
|
||||
|
@ -38,6 +55,10 @@ public class MetadataSettings
|
|||
/// Allow setting the Localized name
|
||||
/// </summary>
|
||||
public bool EnableLocalizedName { get; set; }
|
||||
/// <summary>
|
||||
/// Allow setting the cover image
|
||||
/// </summary>
|
||||
public bool EnableCoverImage { get; set; }
|
||||
|
||||
// Need to handle the Genre/tags stuff
|
||||
public bool EnableGenres { get; set; } = true;
|
||||
|
@ -58,6 +79,11 @@ public class MetadataSettings
|
|||
/// </summary>
|
||||
public List<MetadataFieldMapping> FieldMappings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of overrides that will enable writing to locked fields
|
||||
/// </summary>
|
||||
public List<MetadataSettingField> Overrides { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Do not allow any Genre/Tag in this list to be written to Kavita
|
||||
/// </summary>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using API.Entities.Enums;
|
||||
using API.Entities.Interfaces;
|
||||
using API.Entities.Metadata;
|
||||
using API.Services.Plus;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
|
@ -18,29 +19,30 @@ public class Person : IHasCoverImage
|
|||
public string PrimaryColor { get; set; }
|
||||
public string SecondaryColor { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// ASIN for person
|
||||
/// </summary>
|
||||
/// <remarks>Can be used for Amazon author lookup</remarks>
|
||||
public string? Asin { get; set; }
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// ASIN for person
|
||||
/// </summary>
|
||||
/// <remarks>Can be used for Amazon author lookup</remarks>
|
||||
public string? Asin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// https://anilist.co/staff/{AniListId}/
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public int AniListId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// https://myanimelist.net/people/{MalId}/
|
||||
/// https://myanimelist.net/character/{MalId}/CharacterName
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public long MalId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// https://hardcover.app/authors/{HardcoverId}
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public string? HardcoverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// https://anilist.co/staff/{AniListId}/
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public int AniListId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// https://myanimelist.net/people/{MalId}/
|
||||
/// https://myanimelist.net/character/{MalId}/CharacterName
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public long MalId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// https://hardcover.app/authors/{HardcoverId}
|
||||
/// </summary>
|
||||
/// <remarks>Kavita+ Only</remarks>
|
||||
public string? HardcoverId { get; set; }
|
||||
/// <summary>
|
||||
/// https://metron.cloud/creator/{slug}/
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using API.Entities.Enums;
|
||||
using API.Entities.Metadata;
|
||||
using API.Services.Plus;
|
||||
|
||||
namespace API.Entities;
|
||||
|
||||
|
@ -11,5 +12,14 @@ public class SeriesMetadataPeople
|
|||
public int PersonId { get; set; }
|
||||
public virtual Person Person { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The source of this connection. If not Kavita, this implies Metadata Download linked this and it can be removed between matches
|
||||
/// </summary>
|
||||
public bool KavitaPlusConnection { get; set; } = false;
|
||||
/// <summary>
|
||||
/// A weight that allows lower numbers to sort first
|
||||
/// </summary>
|
||||
public int OrderWeight { get; set; }
|
||||
|
||||
public required PersonRole Role { get; set; }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue