diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-01-22 16:48:31 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-01-22 16:48:31 +0100 |
| commit | 2dcb2f8a9f4be9ca69c050ce9ee94d647e8d5d5f (patch) | |
| tree | 3379ed498180e79fd7ce7747d7c67fb053d7a314 /Jellyfin.Api/Controllers/LiveTvController.cs | |
| parent | cd675475bc5f37d4b20ed71271b17d0945b3f969 (diff) | |
Ban the usage of Task.Result
If the calling function can't be made async easily you can still use
.GetAwaiter().GetResult(), which is way easier to find in the future
Diffstat (limited to 'Jellyfin.Api/Controllers/LiveTvController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/LiveTvController.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs index 4240bc3ff..484b0a974 100644 --- a/Jellyfin.Api/Controllers/LiveTvController.cs +++ b/Jellyfin.Api/Controllers/LiveTvController.cs @@ -682,7 +682,7 @@ namespace Jellyfin.Api.Controllers [HttpGet("Programs/Recommended")] [Authorize(Policy = Policies.DefaultAuthorization)] [ProducesResponseType(StatusCodes.Status200OK)] - public ActionResult<QueryResult<BaseItemDto>> GetRecommendedPrograms( + public async Task<ActionResult<QueryResult<BaseItemDto>>> GetRecommendedPrograms( [FromQuery] Guid? userId, [FromQuery] int? limit, [FromQuery] bool? isAiring, @@ -721,7 +721,7 @@ namespace Jellyfin.Api.Controllers var dtoOptions = new DtoOptions { Fields = fields } .AddClientFields(Request) .AddAdditionalDtoOptions(enableImages, enableUserData, imageTypeLimit, enableImageTypes); - return _liveTvManager.GetRecommendedPrograms(query, dtoOptions, CancellationToken.None); + return await _liveTvManager.GetRecommendedProgramsAsync(query, dtoOptions, CancellationToken.None).ConfigureAwait(false); } /// <summary> |
