mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Added PetaPoco
This commit is contained in:
parent
6355d5ada1
commit
63f6899894
43 changed files with 29270 additions and 85 deletions
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MvcMiniProfiler;
|
||||
using Ninject;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Helpers;
|
||||
|
@ -205,12 +206,15 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
public virtual Tuple<int, int> GetEpisodeFilesCount(int seriesId)
|
||||
{
|
||||
var allEpisodes = _episodeProvider.GetEpisodeBySeries(seriesId);
|
||||
using (MiniProfiler.Current.Step("GetEpisodeFilesCount:" + seriesId))
|
||||
{
|
||||
var allEpisodes = _episodeProvider.GetEpisodeBySeries(seriesId);
|
||||
|
||||
var episodeTotal = allEpisodes.Where(e => !e.Ignored && e.AirDate <= DateTime.Today && e.AirDate.Year > 1900);
|
||||
var avilableEpisodes = episodeTotal.Where(e => e.EpisodeFileId > 0);
|
||||
var episodeTotal = allEpisodes.Where(e => !e.Ignored && e.AirDate <= DateTime.Today && e.AirDate.Year > 1900).ToList();
|
||||
var avilableEpisodes = episodeTotal.Where(e => e.EpisodeFileId > 0).ToList();
|
||||
|
||||
return new Tuple<int, int>(avilableEpisodes.Count(), episodeTotal.Count());
|
||||
return new Tuple<int, int>(avilableEpisodes.Count, episodeTotal.Count);
|
||||
}
|
||||
}
|
||||
|
||||
private List<string> GetMediaFileList(string path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue