mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-04-02 23:33:41 -04:00
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Kavita.Models.DTOs.Progress;
|
|
using Kavita.Models.Entities;
|
|
using Kavita.Models.Entities.Progress;
|
|
|
|
namespace Kavita.API.Services.Reading;
|
|
|
|
public interface IReadingSessionService
|
|
{
|
|
Task UpdateProgress(int userId, ProgressDto progressDto, ClientInfoData? clientInfo, int? deviceId);
|
|
|
|
/// <summary>
|
|
/// Generate new reading sessions for all chapters in the given series (Incorrect chapterIds are ignored)
|
|
///
|
|
/// Chapters will be read in ascending <see cref="Chapter.SortOrder"/>.
|
|
/// With the last chapter being finished reading now
|
|
/// </summary>
|
|
/// <param name="userId"></param>
|
|
/// <param name="seriesId"></param>
|
|
/// <param name="chaptersMap">A dictionary mapping chapter ids to progress counts from where the session should be generated</param>
|
|
/// <param name="ct"></param>
|
|
/// <returns></returns>
|
|
Task GenerateReadingSessionForChapters(int userId, int seriesId, Dictionary<int, int> chaptersMap, CancellationToken ct = default);
|
|
|
|
}
|