using System.Collections.Generic;
using System.Linq;
using API.Entities.Enums;
namespace API.Entities;
///
/// Represents which field that can be written to as an override when already locked
///
public enum MetadataSettingField
{
Summary = 1,
PublicationStatus = 2,
StartDate = 3,
Genres = 4,
Tags = 5,
LocalizedName = 6,
Covers = 7,
AgeRating = 8,
People = 9
}
///
/// Handles the metadata settings for Kavita+
///
public class MetadataSettings
{
public int Id { get; set; }
///
/// If writing any sort of metadata from upstream (AniList, Hardcover) source is allowed
///
public bool Enabled { get; set; }
///
/// Allow the Summary to be written
///
public bool EnableSummary { get; set; }
///
/// Allow Publication status to be derived and updated
///
public bool EnablePublicationStatus { get; set; }
///
/// Allow Relationships between series to be set
///
public bool EnableRelationships { get; set; }
///
/// Allow People to be created (including downloading images)
///
public bool EnablePeople { get; set; }
///
/// Allow Start date to be set within the Series
///
public bool EnableStartDate { get; set; }
///
/// Allow setting the Localized name
///
public bool EnableLocalizedName { get; set; }
///
/// Allow setting the cover image
///
public bool EnableCoverImage { get; set; }
// Need to handle the Genre/tags stuff
public bool EnableGenres { get; set; } = true;
public bool EnableTags { get; set; } = true;
///
/// For Authors and Writers, how should names be stored (Exclusively applied for AniList). This does not affect Character names.
///
public bool FirstLastPeopleNaming { get; set; }
///
/// Any Genres or Tags that if present, will trigger an Age Rating Override. Highest rating will be prioritized for matching.
///
public Dictionary AgeRatingMappings { get; set; }
///
/// A list of rules that allow mapping a genre/tag to another genre/tag
///
public List FieldMappings { get; set; }
///
/// A list of overrides that will enable writing to locked fields
///
public List Overrides { get; set; }
///
/// Do not allow any Genre/Tag in this list to be written to Kavita
///
public List Blacklist { get; set; }
///
/// Only allow these Tags to be written to Kavita
///
public List Whitelist { get; set; }
///
/// Which Roles to allow metadata downloading for
///
public List PersonRoles { get; set; }
}