use MediaBrowser.Common.Api
This commit is contained in:
parent
bae53323fe
commit
b5f5c004ad
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
|
using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
|
||||||
|
using MediaBrowser.Common.Api;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@ -115,7 +116,7 @@ public class SkipIntroController : ControllerBase
|
|||||||
/// <param name="mode">Mode.</param>
|
/// <param name="mode">Mode.</param>
|
||||||
/// <response code="204">Operation successful.</response>
|
/// <response code="204">Operation successful.</response>
|
||||||
/// <returns>No content.</returns>
|
/// <returns>No content.</returns>
|
||||||
[Authorize(Policy = "RequiresElevation")]
|
[Authorize(Policy = Policies.RequiresElevation)]
|
||||||
[HttpPost("Intros/EraseTimestamps")]
|
[HttpPost("Intros/EraseTimestamps")]
|
||||||
public ActionResult ResetIntroTimestamps([FromQuery] AnalysisMode mode)
|
public ActionResult ResetIntroTimestamps([FromQuery] AnalysisMode mode)
|
||||||
{
|
{
|
||||||
@ -138,7 +139,7 @@ public class SkipIntroController : ControllerBase
|
|||||||
/// <param name="mode">Mode.</param>
|
/// <param name="mode">Mode.</param>
|
||||||
/// <response code="200">All timestamps have been returned.</response>
|
/// <response code="200">All timestamps have been returned.</response>
|
||||||
/// <returns>List of IntroWithMetadata objects.</returns>
|
/// <returns>List of IntroWithMetadata objects.</returns>
|
||||||
[Authorize(Policy = "RequiresElevation")]
|
[Authorize(Policy = Policies.RequiresElevation)]
|
||||||
[HttpGet("Intros/All")]
|
[HttpGet("Intros/All")]
|
||||||
public ActionResult<List<IntroWithMetadata>> GetAllTimestamps(
|
public ActionResult<List<IntroWithMetadata>> GetAllTimestamps(
|
||||||
[FromQuery] AnalysisMode mode = AnalysisMode.Introduction)
|
[FromQuery] AnalysisMode mode = AnalysisMode.Introduction)
|
||||||
|
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using MediaBrowser.Common;
|
using MediaBrowser.Common;
|
||||||
|
using MediaBrowser.Common.Api;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@ -12,7 +13,7 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper.Controllers;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Troubleshooting controller.
|
/// Troubleshooting controller.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Authorize(Policy = "RequiresElevation")]
|
[Authorize(Policy = Policies.RequiresElevation)]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Produces(MediaTypeNames.Application.Json)]
|
[Produces(MediaTypeNames.Application.Json)]
|
||||||
[Route("IntroSkipper")]
|
[Route("IntroSkipper")]
|
||||||
|
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Net.Mime;
|
using System.Net.Mime;
|
||||||
|
using MediaBrowser.Common.Api;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -11,7 +12,7 @@ namespace ConfusedPolarBear.Plugin.IntroSkipper.Controllers;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Audio fingerprint visualization controller. Allows browsing fingerprints on a per episode basis.
|
/// Audio fingerprint visualization controller. Allows browsing fingerprints on a per episode basis.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Authorize(Policy = "RequiresElevation")]
|
[Authorize(Policy = Policies.RequiresElevation)]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
[Produces(MediaTypeNames.Application.Json)]
|
[Produces(MediaTypeNames.Application.Json)]
|
||||||
[Route("Intros")]
|
[Route("Intros")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user