More fixes for signalr + episodes

pull/2/head
Mark McDowall 11 years ago
parent 293e6cac6d
commit a6639fecd9

@ -8,7 +8,7 @@ using NzbDrone.Core.Tv;
namespace NzbDrone.Api.Calendar
{
public class CalendarModule : EpisodeModuleWithSignalR<EpisodeResource, Episode>
public class CalendarModule : EpisodeModuleWithSignalR
{
private readonly IEpisodeService _episodeService;
private readonly SeriesRepository _seriesRepository;
@ -22,7 +22,6 @@ namespace NzbDrone.Api.Calendar
_seriesRepository = seriesRepository;
GetResourceAll = GetCalendar;
GetResourceById = GetEpisode;
}
private List<EpisodeResource> GetCalendar()

@ -5,8 +5,7 @@ using NzbDrone.Core.Tv;
namespace NzbDrone.Api.Episodes
{
public class EpisodeModule : EpisodeModuleWithSignalR<EpisodeResource, Episode>
public class EpisodeModule : EpisodeModuleWithSignalR
{
private readonly IEpisodeService _episodeService;

@ -8,11 +8,9 @@ using NzbDrone.Core.Tv;
namespace NzbDrone.Api.Episodes
{
public abstract class EpisodeModuleWithSignalR<TResource, TModel> : NzbDroneRestModuleWithSignalR<TResource, TModel>,
public abstract class EpisodeModuleWithSignalR : NzbDroneRestModuleWithSignalR<EpisodeResource, Episode>,
IHandle<EpisodeGrabbedEvent>,
IHandle<EpisodeDownloadedEvent>
where TResource : EpisodeResource, new()
where TModel : Episode
{
private readonly IEpisodeService _episodeService;
@ -20,6 +18,8 @@ namespace NzbDrone.Api.Episodes
: base(commandExecutor)
{
_episodeService = episodeService;
GetResourceById = GetEpisode;
}
protected EpisodeModuleWithSignalR(IEpisodeService episodeService, ICommandExecutor commandExecutor, string resource)
@ -37,7 +37,7 @@ namespace NzbDrone.Api.Episodes
{
foreach (var episode in message.Episode.Episodes)
{
var resource = episode.InjectTo<TResource>();
var resource = episode.InjectTo<EpisodeResource>();
resource.Grabbed = true;
BroadcastResourceChange(ModelAction.Updated, resource);

@ -7,7 +7,7 @@ using NzbDrone.Core.Tv;
namespace NzbDrone.Api.Wanted
{
public class CutoffModule : EpisodeModuleWithSignalR<EpisodeResource, Episode>
public class CutoffModule : EpisodeModuleWithSignalR
{
private readonly IEpisodeCutoffService _episodeCutoffService;
private readonly ISeriesRepository _seriesRepository;

@ -7,7 +7,7 @@ using NzbDrone.Core.Tv;
namespace NzbDrone.Api.Wanted
{
public class MissingModule : EpisodeModuleWithSignalR<EpisodeResource, Episode>
public class MissingModule : EpisodeModuleWithSignalR
{
private readonly IEpisodeService _episodeService;
private readonly ISeriesRepository _seriesRepository;

Loading…
Cancel
Save