using System; using System.ComponentModel; using API.DTOs.Recommendation; namespace API.DTOs.Scrobbling; #nullable enable public enum ScrobbleEventType { [Description("Chapter Read")] ChapterRead = 0, [Description("Add to Want to Read")] AddWantToRead = 1, [Description("Remove from Want to Read")] RemoveWantToRead = 2, [Description("Score Updated")] ScoreUpdated = 3, [Description("Review Added/Updated")] Review = 4 } /// /// Represents PlusMediaFormat /// public enum MediaFormat { [Description("Manga")] Manga = 1, [Description("Comic")] Comic = 2, [Description("LightNovel")] LightNovel = 3, [Description("Book")] Book = 4, Unknown = 5 } public class ScrobbleDto { /// /// User's access token to allow us to talk on their behalf /// public string AniListToken { get; set; } public string SeriesName { get; set; } public string LocalizedSeriesName { get; set; } public MediaFormat Format { get; set; } public int? Year { get; set; } /// /// Optional AniListId if present on Kavita's WebLinks /// public int? AniListId { get; set; } = 0; public int? MALId { get; set; } = 0; public string BakaUpdatesId { get; set; } = string.Empty; public ScrobbleEventType ScrobbleEventType { get; set; } /// /// Number of chapters read /// /// If completed series, this can consider the Series Read (AniList) public int? ChapterNumber { get; set; } /// /// Number of Volumes read /// /// This will not consider the series Completed, even if all Volumes have been read (AniList) public int? VolumeNumber { get; set; } /// /// Rating for the Series /// public float? Rating { get; set; } public string? ReviewTitle { get; set; } public string? ReviewBody { get; set; } /// /// The date that the series was started reading. Will be null for non ReadingProgress events /// public DateTime? StartedReadingDateUtc { get; set; } /// /// The latest date the series was read. Will be null for non ReadingProgress events /// public DateTime? LatestReadingDateUtc { get; set; } /// /// The date that the series was scrobbled. Will be null for non ReadingProgress events /// public DateTime? ScrobbleDateUtc { get; set; } /// /// Optional but can help with matching /// public string? Isbn { get; set; } }