mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Report size is now verified to ensure it is under the MaxSize for that quality type, with tests.
This commit is contained in:
parent
e4f01ae0d4
commit
4b2427ade7
7 changed files with 479 additions and 3 deletions
|
@ -330,6 +330,21 @@ namespace NzbDrone.Core.Providers
|
|||
Logger.Info("Ignore flag for Episode:{0} successfully set to {1}", episodeId, isIgnored);
|
||||
}
|
||||
|
||||
public virtual bool IsFirstOrLastEpisodeOfSeason(int seriesId, int seasonNumber, int episodeNumber)
|
||||
{
|
||||
var episodes = GetEpisodesBySeason(seriesId, seasonNumber).OrderBy(e => e.EpisodeNumber);
|
||||
|
||||
if (episodes.Count() == 0)
|
||||
return false;
|
||||
|
||||
//Ensure that this is either the first episode
|
||||
//or is the last episode in a season that has 10 or more episodes
|
||||
if (episodes.First().EpisodeNumber == episodeNumber || (episodes.Count() >= 10 && episodes.Last().EpisodeNumber == episodeNumber))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public IList<Episode> AttachSeries(IList<Episode> episodes)
|
||||
{
|
||||
if (episodes.Count == 0) return episodes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue