You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-11-06 09:19:38 +02:00
RssItemProcessingProvider will now handle full series NZBs.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Model;
|
||||
using NzbDrone.Core.Repository;
|
||||
using SubSonic.Repository;
|
||||
using System.Linq;
|
||||
@@ -10,11 +11,14 @@ namespace NzbDrone.Core.Providers
|
||||
class SeasonProvider : ISeasonProvider
|
||||
{
|
||||
private readonly IRepository _sonicRepo;
|
||||
private readonly ISeriesProvider _seriesProvider;
|
||||
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public SeasonProvider(IRepository dataRepository)
|
||||
public SeasonProvider(IRepository dataRepository, ISeriesProvider seriesProvider)
|
||||
{
|
||||
_sonicRepo = dataRepository;
|
||||
_seriesProvider = seriesProvider;
|
||||
}
|
||||
|
||||
public Season GetSeason(int seasonId)
|
||||
@@ -22,6 +26,11 @@ namespace NzbDrone.Core.Providers
|
||||
return _sonicRepo.Single<Season>(seasonId);
|
||||
}
|
||||
|
||||
public Season GetSeason(int seriesId, int seasonNumber)
|
||||
{
|
||||
return _sonicRepo.Single<Season>(s => s.SeriesId == seriesId && s.SeasonNumber == seasonNumber);
|
||||
}
|
||||
|
||||
public List<Season> GetSeasons(int seriesId)
|
||||
{
|
||||
return _sonicRepo.All<Season>().Where(s => s.SeriesId == seriesId).ToList();
|
||||
@@ -70,7 +79,7 @@ namespace NzbDrone.Core.Providers
|
||||
if (season == null)
|
||||
return true;
|
||||
|
||||
return season.Monitored;
|
||||
return !season.Monitored;
|
||||
}
|
||||
|
||||
public void DeleteSeason(int seasonId)
|
||||
|
||||
Reference in New Issue
Block a user