You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/NzbDrone.Web/Controllers/EpisodeController.cs

56 lines
1.6 KiB

using System;
using System.Web.Mvc;
using NzbDrone.Core.Jobs;
14 years ago
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");
14 years ago
}
public JsonResult SearchSeason(int seriesId, int seasonNumber)
{
_jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber);
return JsonNotificationResult.Queued("Season search");
}
13 years ago
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");
}
14 years ago
}
}