mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
f6c9fa4f95
Add UI controls for new jobs. Skip ignored episodes when doing series/season searches.
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using NzbDrone.Core.Providers.Jobs;
|
|
|
|
namespace NzbDrone.Web.Controllers
|
|
{
|
|
public class CommandController : Controller
|
|
{
|
|
private readonly JobProvider _jobProvider;
|
|
|
|
public CommandController(JobProvider jobProvider)
|
|
{
|
|
_jobProvider = jobProvider;
|
|
}
|
|
|
|
public JsonResult RssSync()
|
|
{
|
|
_jobProvider.QueueJob(typeof(RssSyncJob));
|
|
return new JsonResult { Data = "ok", JsonRequestBehavior = JsonRequestBehavior.AllowGet };
|
|
}
|
|
|
|
public JsonResult SyncEpisodesOnDisk(int seriesId)
|
|
{
|
|
//Syncs the episodes on disk for the specified series
|
|
_jobProvider.QueueJob(typeof(DiskScanJob), seriesId);
|
|
|
|
return new JsonResult { Data = "ok", JsonRequestBehavior = JsonRequestBehavior.AllowGet };
|
|
}
|
|
|
|
public JsonResult UpdateInfo(int seriesId)
|
|
{
|
|
//Syncs the episodes on disk for the specified series
|
|
_jobProvider.QueueJob(typeof(UpdateInfoJob), seriesId);
|
|
|
|
return new JsonResult { Data = "ok", JsonRequestBehavior = JsonRequestBehavior.AllowGet };
|
|
}
|
|
}
|
|
}
|