Just need to do individual issue metadata.

This commit is contained in:
Joseph Milazzo 2025-03-16 16:18:31 -05:00
parent eba5e6875f
commit 579cd847af
5 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using API.DTOs.SeriesDetail;
namespace API.DTOs.KavitaPlus.Metadata;
/// <summary>
/// Information about an individual issue/chapter/book from Kavita+
/// </summary>
public class ExternalChapterDto
{
public string Title { get; set; }
public string IssueNumber { get; set; }
public decimal? CriticRating { get; set; }
public decimal? UserRating { get; set; }
public string? Summary { get; set; }
public string? Writer { get; set; }
public string? Artist { get; set; }
public DateTime? ReleaseDate { get; set; }
public string? Publisher { get; set; }
public string? CoverImageUrl { get; set; }
public string? IssueUrl { get; set; }
public IList<UserReviewDto> CriticReviews { get; set; }
public IList<UserReviewDto> UserReviews { get; set; }
}

View file

@ -34,5 +34,13 @@ public class ExternalSeriesDetailDto
public IList<SeriesRelationship>? Relations { get; set; } = [];
public IList<SeriesCharacter>? Characters { get; set; } = [];
#region Comic Only
public string Publisher { get; set; }
/// <summary>
/// Only from CBR for <see cref="ScrobbleProvider.Cbr"/>. Full metadata about issues
/// </summary>
public IList<ExternalChapterDto> ChapterDtos { get; set; }
#endregion
}

View file

@ -609,6 +609,8 @@ public class ExternalMetadataService : IExternalMetadataService
madeModification = await UpdateRelationships(series, settings, externalMetadata.Relations, defaultAdmin) || madeModification;
madeModification = await UpdateCoverImage(series, settings, externalMetadata) || madeModification;
// TODO: Hook in individual issue metadata
return madeModification;
}

View file

@ -263,6 +263,7 @@ public class LicenseService(
if (cacheValue.HasValue) return cacheValue.Value;
}
// TODO: If info.IsCancelled && notActive, let's remove the license so we aren't constantly checking
try
{

View file

@ -37,6 +37,7 @@ public enum ScrobbleProvider
Kavita = 0,
AniList = 1,
Mal = 2,
Cbr = 3
}
public interface IScrobblingService