1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-30 19:45:57 +00:00
Lidarr/NzbDrone.Web/Controllers/EpisodeController.cs

54 lines
1.6 KiB
C#
Raw Normal View History

using System.Web.Mvc;
2011-12-02 01:33:17 +00:00
using NzbDrone.Core.Jobs;
2011-05-27 06:03:57 +00:00
using NzbDrone.Web.Models;
namespace NzbDrone.Web.Controllers
{
public class EpisodeController : Controller
{
private readonly JobProvider _jobProvider;
public EpisodeController(JobProvider jobProvider)
{
_jobProvider = jobProvider;
}
[HttpPost]
2011-05-27 06:03:57 +00:00
public JsonResult Search(int episodeId)
{
_jobProvider.QueueJob(typeof(EpisodeSearchJob), episodeId);
return JsonNotificationResult.Info("Queued");
2011-05-27 06:03:57 +00:00
}
[HttpPost]
public JsonResult SearchSeason(int seriesId, int seasonNumber)
{
_jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber);
return JsonNotificationResult.Info("Queued");
}
2011-11-26 07:53:16 +00:00
public JsonResult BacklogSeries(int seriesId)
{
_jobProvider.QueueJob(typeof(SeriesSearchJob), seriesId);
return JsonNotificationResult.Info("Queued");
}
public JsonResult Rename(int episodeFileId)
{
_jobProvider.QueueJob(typeof(RenameEpisodeJob), episodeFileId);
return JsonNotificationResult.Info("Queued");
}
public JsonResult RenameSeason(int seriesId, int seasonNumber)
{
_jobProvider.QueueJob(typeof(RenameSeasonJob), seriesId, seasonNumber);
return JsonNotificationResult.Info("Queued");
}
2011-11-26 07:53:16 +00:00
public JsonResult RenameEpisodes(int seriesId)
{
_jobProvider.QueueJob(typeof(RenameSeriesJob), seriesId);
return JsonNotificationResult.Info("Queued");
}
2011-05-27 06:03:57 +00:00
}
}