1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 16:32:56 +01:00
Sonarr/NzbDrone.Web/Controllers/EpisodeController.cs

56 lines
1.6 KiB
C#
Raw Normal View History

using System;
using System.Web.Mvc;
2011-12-02 02:33:17 +01:00
using NzbDrone.Core.Jobs;
2011-05-27 08:03:57 +02:00
using NzbDrone.Web.Models;
namespace NzbDrone.Web.Controllers
{
public class EpisodeController : Controller
{
private readonly JobProvider _jobProvider;
public EpisodeController(JobProvider jobProvider)
{
_jobProvider = jobProvider;
}
public JsonResult Search(int episodeId)
{
_jobProvider.QueueJob(typeof(EpisodeSearchJob), episodeId);
return JsonNotificationResult.Queued("Episode search");
2011-05-27 08:03:57 +02:00
}
public JsonResult SearchSeason(int seriesId, int seasonNumber)
{
_jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber);
return JsonNotificationResult.Queued("Season search");
}
2011-11-26 08:53:16 +01:00
public JsonResult BacklogSeries(int seriesId)
{
_jobProvider.QueueJob(typeof(SeriesSearchJob), seriesId);
return JsonNotificationResult.Queued("Series Backlog");
}
public JsonResult RenameSeason(int seriesId, int seasonNumber)
{
_jobProvider.QueueJob(typeof(RenameSeasonJob), seriesId, seasonNumber);
return JsonNotificationResult.Queued("Season rename");
}
public JsonResult RenameSeries(int seriesId)
{
_jobProvider.QueueJob(typeof(RenameSeriesJob), seriesId);
return JsonNotificationResult.Queued("Series rename");
}
public JsonResult RenameAllSeries()
{
_jobProvider.QueueJob(typeof(RenameSeriesJob));
return JsonNotificationResult.Queued("Series rename");
}
2011-05-27 08:03:57 +02:00
}
}