1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00

Merge remote-tracking branch 'origin/dynamic-jobs'

This commit is contained in:
Mark McDowall
2012-10-19 08:39:07 -07:00
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");
}
+2 -2
View File
@@ -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();
}
+1 -2
View File
@@ -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);