mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Less shitty way to do series stats for single requests and fixed tests
This commit is contained in:
parent
c3b8b52644
commit
40f49d7385
3 changed files with 71 additions and 21 deletions
|
@ -6,6 +6,7 @@ namespace NzbDrone.Core.SeriesStats
|
|||
public interface ISeriesStatisticsService
|
||||
{
|
||||
List<SeriesStatistics> SeriesStatistics();
|
||||
SeriesStatistics SeriesStatistics(int seriesId);
|
||||
}
|
||||
|
||||
public class SeriesStatisticsService : ISeriesStatisticsService
|
||||
|
@ -21,5 +22,14 @@ namespace NzbDrone.Core.SeriesStats
|
|||
{
|
||||
return _seriesStatisticsRepository.SeriesStatistics();
|
||||
}
|
||||
|
||||
public SeriesStatistics SeriesStatistics(int seriesId)
|
||||
{
|
||||
var stats = _seriesStatisticsRepository.SeriesStatistics(seriesId);
|
||||
|
||||
if (stats == null) return new SeriesStatistics();
|
||||
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue