You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
885 B
37 lines
885 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Web.Mvc;
|
|
using NzbDrone.Core.Providers;
|
|
using NzbDrone.Core.Providers.Core;
|
|
using NzbDrone.Core.Providers.Jobs;
|
|
using NzbDrone.Web.Models;
|
|
|
|
namespace NzbDrone.Web.Controllers
|
|
{
|
|
public class EpisodeController : Controller
|
|
{
|
|
|
|
private readonly JobProvider _jobProvider;
|
|
|
|
|
|
public EpisodeController(JobProvider jobProvider)
|
|
{
|
|
|
|
_jobProvider = jobProvider;
|
|
}
|
|
|
|
public JsonResult Search(int episodeId)
|
|
{
|
|
_jobProvider.QueueJob(typeof(EpisodeSearchJob), episodeId);
|
|
return new JsonResult { Data = "ok" };
|
|
}
|
|
|
|
public JsonResult Rename(int episodeFileId)
|
|
{
|
|
_jobProvider.QueueJob(typeof(RenameEpisodeJob), episodeFileId);
|
|
|
|
return new JsonResult { Data = "ok" };
|
|
}
|
|
}
|
|
} |