Files
Jellyfin-Featured-plugin/Api/NewReleasesController.cs
2026-03-23 00:18:34 -07:00

28 lines
840 B
C#

using Jellyfin.Plugin.NewReleases.Models;
using Jellyfin.Plugin.NewReleases.Services;
using MediaBrowser.Controller.Library;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Jellyfin.Plugin.NewReleases.Api;
[ApiController]
[Route("Plugins/NewReleases")]
public sealed class NewReleasesController : ControllerBase
{
private readonly NewReleasesService _newReleasesService;
public NewReleasesController(ILibraryManager libraryManager)
{
_newReleasesService = new NewReleasesService(libraryManager);
}
[HttpGet("Movies")]
[ProducesResponseType(typeof(NewReleasesResponse), StatusCodes.Status200OK)]
public ActionResult<NewReleasesResponse> GetNewlyReleasedMovies()
{
var response = _newReleasesService.GetNewlyReleasedMovies();
return Ok(response);
}
}