mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 17:59:14 +00:00
3b18c9f621
Fix: while renaming series/seasons a single failure no longer stops the whole process Fix: much better notification during batch rename
49 lines
No EOL
1.4 KiB
C#
49 lines
No EOL
1.4 KiB
C#
using System;
|
|
using System.Web.Mvc;
|
|
using NzbDrone.Core.Jobs;
|
|
using NzbDrone.Web.Models;
|
|
|
|
namespace NzbDrone.Web.Controllers
|
|
{
|
|
public class EpisodeController : Controller
|
|
{
|
|
private readonly JobProvider _jobProvider;
|
|
|
|
public EpisodeController(JobProvider jobProvider)
|
|
{
|
|
_jobProvider = jobProvider;
|
|
}
|
|
|
|
[HttpPost]
|
|
public JsonResult Search(int episodeId)
|
|
{
|
|
_jobProvider.QueueJob(typeof(EpisodeSearchJob), episodeId);
|
|
return JsonNotificationResult.Info("Queued");
|
|
}
|
|
|
|
[HttpPost]
|
|
public JsonResult SearchSeason(int seriesId, int seasonNumber)
|
|
{
|
|
_jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber);
|
|
return JsonNotificationResult.Info("Queued");
|
|
}
|
|
|
|
public JsonResult BacklogSeries(int seriesId)
|
|
{
|
|
_jobProvider.QueueJob(typeof(SeriesSearchJob), seriesId);
|
|
return JsonNotificationResult.Info("Queued");
|
|
}
|
|
|
|
public JsonResult RenameSeason(int seriesId, int seasonNumber)
|
|
{
|
|
_jobProvider.QueueJob(typeof(RenameSeasonJob), seriesId, seasonNumber);
|
|
return JsonNotificationResult.Info("Queued");
|
|
}
|
|
|
|
public JsonResult RenameEpisodes(int seriesId)
|
|
{
|
|
_jobProvider.QueueJob(typeof(RenameSeriesJob), seriesId);
|
|
return JsonNotificationResult.Info("Queued");
|
|
}
|
|
}
|
|
} |