|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using NzbDrone.Api.Episodes;
|
|
|
|
using NzbDrone.Api.Episodes;
|
|
|
|
using NzbDrone.Api.Extensions;
|
|
|
|
using NzbDrone.Api.Extensions;
|
|
|
|
using NzbDrone.Api.Mapping;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
|
using NzbDrone.Core.Tv;
|
|
|
|
|
|
|
|
|
|
|
@ -17,7 +16,7 @@ namespace NzbDrone.Api.Calendar
|
|
|
|
public CalendarModule(ICommandExecutor commandExecutor,
|
|
|
|
public CalendarModule(ICommandExecutor commandExecutor,
|
|
|
|
IEpisodeService episodeService,
|
|
|
|
IEpisodeService episodeService,
|
|
|
|
SeriesRepository seriesRepository)
|
|
|
|
SeriesRepository seriesRepository)
|
|
|
|
: base(commandExecutor, "calendar")
|
|
|
|
: base(episodeService, commandExecutor, "calendar")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_episodeService = episodeService;
|
|
|
|
_episodeService = episodeService;
|
|
|
|
_seriesRepository = seriesRepository;
|
|
|
|
_seriesRepository = seriesRepository;
|
|
|
@ -26,11 +25,6 @@ namespace NzbDrone.Api.Calendar
|
|
|
|
GetResourceById = GetEpisode;
|
|
|
|
GetResourceById = GetEpisode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private EpisodeResource GetEpisode(int id)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _episodeService.GetEpisode(id).InjectTo<EpisodeResource>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<EpisodeResource> GetCalendar()
|
|
|
|
private List<EpisodeResource> GetCalendar()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var start = DateTime.Today;
|
|
|
|
var start = DateTime.Today;
|
|
|
|