Lots of Hangfire attempts to solve the lock issue. Not sure how to fix it. Added some APIs for streams.

This commit is contained in:
Joseph Milazzo 2021-03-15 13:49:13 -05:00
parent bb0a59448f
commit fad4ca4414
10 changed files with 89 additions and 28 deletions

View file

@ -128,9 +128,18 @@ namespace API.Controllers
}
[HttpGet("recently-added")]
public async Task<ActionResult<IEnumerable<SeriesDto>>> GetRecentlyAdded(int libraryId = 0)
public async Task<ActionResult<IEnumerable<SeriesDto>>> GetRecentlyAdded(int libraryId = 0, int limit = 20)
{
return Ok(await _unitOfWork.SeriesRepository.GetRecentlyAdded(libraryId));
return Ok(await _unitOfWork.SeriesRepository.GetRecentlyAdded(libraryId, limit));
}
[HttpGet("in-progress")]
public async Task<ActionResult<IEnumerable<SeriesDto>>> GetInProgress(int libraryId = 0, int limit = 20)
{
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername());
return Ok(await _unitOfWork.SeriesRepository.GetInProgress(user.Id, libraryId, limit));
}
}
}