using System.Threading; using System.Threading.Tasks; using Hangfire; using Kavita.Models.DTOs.Settings; using Kavita.Models.Entities; using Kavita.Models.Entities.Enums; namespace Kavita.API.Services; public interface IMetadataService { /// /// Recalculates cover images for all entities in a library. /// /// /// /// /// [DisableConcurrentExecution(timeoutInSeconds: 60 * 60 * 60)] [AutomaticRetry(Attempts = 3, OnAttemptsExceeded = AttemptsExceededAction.Delete)] Task GenerateCoversForLibrary(int libraryId, bool forceUpdate = false, bool forceColorScape = false, CancellationToken ct = default); /// /// Performs a forced refresh of cover images just for a series, and it's nested entities /// /// /// /// /// Overrides any cache logic and forces execution /// /// Task GenerateCoversForSeries(ServerSettingDto serverSetting, int libraryId, int seriesId, bool forceUpdate = true, bool forceColorScape = true, CancellationToken ct = default); Task GenerateCoversForSeries(Series series, EncodeFormat encodeFormat, CoverImageSize coverImageSize, bool forceUpdate = false, bool forceColorScape = true, CancellationToken ct = default); Task RemoveAbandonedMetadataKeys(CancellationToken ct = default); }