Next Estimated Chapter (#2342)

This commit is contained in:
Joe Milazzo 2023-10-22 10:44:26 -05:00 committed by GitHub
parent ca5afe94d3
commit de9b09c71f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 433 additions and 73 deletions

View file

@ -46,8 +46,6 @@ public class FilterController : BaseApiController
return BadRequest("You cannot use the name of a system provided stream");
}
// I might just want to use DashboardStream instead of a separate entity. It will drastically simplify implementation
var existingFilter =
user.SmartFilters.FirstOrDefault(f => f.Name.Equals(dto.Name, StringComparison.InvariantCultureIgnoreCase));
if (existingFilter != null)

View file

@ -610,4 +610,18 @@ public class SeriesController : BaseApiController
}
}
/// <summary>
/// Based on the delta times between when chapters are added, for series that are not Completed/Cancelled/Hiatus, forecast the next
/// date when it will be available.
/// </summary>
/// <param name="seriesId"></param>
/// <returns></returns>
[HttpGet("next-expected")]
public async Task<ActionResult<NextExpectedChapterDto>> GetNextExpectedChapter(int seriesId)
{
var userId = User.GetUserId();
return Ok(await _seriesService.GetEstimatedChapterCreationDate(seriesId, userId));
}
}