23 lines
600 B
C#
23 lines
600 B
C#
using Jellyfin.Plugin.MediaCleaner.Data;
|
|
using Jellyfin.Plugin.MediaCleaner.Models;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Jellyfin.Plugin.MediaCleaner.Controllers;
|
|
|
|
[Route("mediacleaner/state")]
|
|
public class StateController : Controller
|
|
{
|
|
private readonly PluginState _state;
|
|
public StateController(PluginState state) => _state = state;
|
|
|
|
[HttpGet]
|
|
public IActionResult Get() => Ok(_state.GetSeriesInfo());
|
|
|
|
[HttpPost("add")]
|
|
public IActionResult AddSeriesInfo([FromBody] SeriesInfo seriesInfo)
|
|
{
|
|
_state.AddSeriesInfo(seriesInfo);
|
|
return Ok();
|
|
}
|
|
}
|