mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
Updated JobProvider to allow jobs with two targets.
JobQueueItem class created instead of using Tuples. Added Search for Season and Rename Season jobs , plus links for them on Series/Details. Add GetSeasonFiles added to MediaFileProvider.
This commit is contained in:
parent
56da830296
commit
350e0388de
32 changed files with 454 additions and 108 deletions
|
@ -11,27 +11,40 @@ 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 new JsonResult { Data = "ok" };
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult SearchSeason(int seriesId, int seasonNumber)
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber);
|
||||
return new JsonResult { Data = "ok" };
|
||||
}
|
||||
|
||||
public JsonResult Rename(int episodeFileId)
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(RenameEpisodeJob), episodeFileId);
|
||||
|
||||
return new JsonResult { Data = "ok" };
|
||||
}
|
||||
|
||||
public JsonResult RenameSeason(int seriesId, int seasonNumber)
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(RenameSeasonJob), seriesId, seasonNumber);
|
||||
|
||||
return new JsonResult { Data = "ok" };
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue