|
|
@ -17,26 +17,31 @@ namespace NzbDrone.Api.Episodes
|
|
|
|
IHandle<EpisodeDownloadedEvent>
|
|
|
|
IHandle<EpisodeDownloadedEvent>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
protected readonly IEpisodeService _episodeService;
|
|
|
|
protected readonly IEpisodeService _episodeService;
|
|
|
|
|
|
|
|
protected readonly ISeriesService _seriesService;
|
|
|
|
protected readonly IQualityUpgradableSpecification _qualityUpgradableSpecification;
|
|
|
|
protected readonly IQualityUpgradableSpecification _qualityUpgradableSpecification;
|
|
|
|
|
|
|
|
|
|
|
|
protected EpisodeModuleWithSignalR(IEpisodeService episodeService,
|
|
|
|
protected EpisodeModuleWithSignalR(IEpisodeService episodeService,
|
|
|
|
|
|
|
|
ISeriesService seriesService,
|
|
|
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
|
|
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
|
|
|
IBroadcastSignalRMessage signalRBroadcaster)
|
|
|
|
IBroadcastSignalRMessage signalRBroadcaster)
|
|
|
|
: base(signalRBroadcaster)
|
|
|
|
: base(signalRBroadcaster)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_episodeService = episodeService;
|
|
|
|
_episodeService = episodeService;
|
|
|
|
|
|
|
|
_seriesService = seriesService;
|
|
|
|
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
|
|
|
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
|
|
|
|
|
|
|
|
|
|
|
GetResourceById = GetEpisode;
|
|
|
|
GetResourceById = GetEpisode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected EpisodeModuleWithSignalR(IEpisodeService episodeService,
|
|
|
|
protected EpisodeModuleWithSignalR(IEpisodeService episodeService,
|
|
|
|
|
|
|
|
ISeriesService seriesService,
|
|
|
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
|
|
|
IQualityUpgradableSpecification qualityUpgradableSpecification,
|
|
|
|
IBroadcastSignalRMessage signalRBroadcaster,
|
|
|
|
IBroadcastSignalRMessage signalRBroadcaster,
|
|
|
|
String resource)
|
|
|
|
String resource)
|
|
|
|
: base(signalRBroadcaster, resource)
|
|
|
|
: base(signalRBroadcaster, resource)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_episodeService = episodeService;
|
|
|
|
_episodeService = episodeService;
|
|
|
|
|
|
|
|
_seriesService = seriesService;
|
|
|
|
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
|
|
|
_qualityUpgradableSpecification = qualityUpgradableSpecification;
|
|
|
|
|
|
|
|
|
|
|
|
GetResourceById = GetEpisode;
|
|
|
|
GetResourceById = GetEpisode;
|
|
|
@ -46,6 +51,7 @@ namespace NzbDrone.Api.Episodes
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var episode = _episodeService.GetEpisode(id);
|
|
|
|
var episode = _episodeService.GetEpisode(id);
|
|
|
|
episode.EpisodeFile.LazyLoad();
|
|
|
|
episode.EpisodeFile.LazyLoad();
|
|
|
|
|
|
|
|
episode.Series = _seriesService.GetSeries(episode.SeriesId);
|
|
|
|
return ToResource(episode);
|
|
|
|
return ToResource(episode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|