mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Merge remote-tracking branch 'origin/dynamic-jobs'
This commit is contained in:
commit
db585b3bd7
52 changed files with 292 additions and 208 deletions
|
@ -26,7 +26,7 @@ namespace NzbDrone.Web.Controllers
|
|||
|
||||
public JsonResult SearchSeason(int seriesId, int seasonNumber)
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(SeasonSearchJob), seriesId, seasonNumber);
|
||||
_jobProvider.QueueJob(typeof(SeasonSearchJob), new { SeriesId = seriesId, SeasonNumber = seasonNumber });
|
||||
return JsonNotificationResult.Queued("Season search");
|
||||
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace NzbDrone.Web.Controllers
|
|||
|
||||
public JsonResult RenameSeason(int seriesId, int seasonNumber)
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(RenameSeasonJob), seriesId, seasonNumber);
|
||||
_jobProvider.QueueJob(typeof(RenameSeasonJob), new { SeriesId = seriesId, SeasonNumber = seasonNumber });
|
||||
return JsonNotificationResult.Queued("Season rename");
|
||||
|
||||
}
|
||||
|
|
|
@ -91,9 +91,9 @@ namespace NzbDrone.Web.Controllers
|
|||
}
|
||||
|
||||
[HttpPost]
|
||||
public EmptyResult DeleteSeries(int seriesId, bool deleteFiles)
|
||||
public EmptyResult Delete(int seriesId, bool deleteFiles)
|
||||
{
|
||||
_jobProvider.QueueJob(typeof(DeleteSeriesJob), seriesId, Convert.ToInt32(deleteFiles));
|
||||
_jobProvider.QueueJob(typeof(DeleteSeriesJob), new { SeriesId = seriesId, DeleteFiles = deleteFiles });
|
||||
|
||||
return new EmptyResult();
|
||||
}
|
||||
|
|
|
@ -41,8 +41,7 @@ namespace NzbDrone.Web.Controllers
|
|||
var queue = _jobProvider.Queue.Select(c => new JobQueueItemModel
|
||||
{
|
||||
Name = c.JobType.Name,
|
||||
TargetId = c.TargetId,
|
||||
SecondaryTargetId = c.SecondaryTargetId
|
||||
Options = c.Options
|
||||
});
|
||||
|
||||
var serializedQueue = new JavaScriptSerializer().Serialize(queue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue