aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/LiveTvController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-12-13 08:32:33 -0700
committercrobibero <cody@robibe.ro>2020-12-13 08:32:33 -0700
commitc6b381db1098041fe975f9830728bf1f000ce71f (patch)
treeb46cf984f3861a306a5e272a20ff1755da6055bf /Jellyfin.Api/Controllers/LiveTvController.cs
parent8c00fbea9cbaca8db2950acd975a81a1d4ac7855 (diff)
Use request body for mapping xml channels
Diffstat (limited to 'Jellyfin.Api/Controllers/LiveTvController.cs')
-rw-r--r--Jellyfin.Api/Controllers/LiveTvController.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/Jellyfin.Api/Controllers/LiveTvController.cs b/Jellyfin.Api/Controllers/LiveTvController.cs
index 56d4b3933..6f2d43227 100644
--- a/Jellyfin.Api/Controllers/LiveTvController.cs
+++ b/Jellyfin.Api/Controllers/LiveTvController.cs
@@ -1119,20 +1119,15 @@ namespace Jellyfin.Api.Controllers
/// <summary>
/// Set channel mappings.
/// </summary>
- /// <param name="providerId">Provider id.</param>
- /// <param name="tunerChannelId">Tuner channel id.</param>
- /// <param name="providerChannelId">Provider channel id.</param>
+ /// <param name="setChannelMappingDto">The set channel mapping dto.</param>
/// <response code="200">Created channel mapping returned.</response>
/// <returns>An <see cref="OkResult"/> containing the created channel mapping.</returns>
[HttpPost("ChannelMappings")]
[Authorize(Policy = Policies.DefaultAuthorization)]
[ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<TunerChannelMapping>> SetChannelMapping(
- [FromQuery] string? providerId,
- [FromQuery] string? tunerChannelId,
- [FromQuery] string? providerChannelId)
+ public async Task<ActionResult<TunerChannelMapping>> SetChannelMapping([FromBody, Required] SetChannelMappingDto setChannelMappingDto)
{
- return await _liveTvManager.SetChannelMapping(providerId, tunerChannelId, providerChannelId).ConfigureAwait(false);
+ return await _liveTvManager.SetChannelMapping(setChannelMappingDto.ProviderId, setChannelMappingDto.TunerChannelId, setChannelMappingDto.ProviderChannelId).ConfigureAwait(false);
}
/// <summary>