mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-26 22:56:23 -04:00
Moved source code under src folder - massive change
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.SeriesStats
|
||||
{
|
||||
public interface ISeriesStatisticsService
|
||||
{
|
||||
List<SeriesStatistics> SeriesStatistics();
|
||||
SeriesStatistics SeriesStatistics(int seriesId);
|
||||
}
|
||||
|
||||
public class SeriesStatisticsService : ISeriesStatisticsService
|
||||
{
|
||||
private readonly SeriesStatisticsRepository _seriesStatisticsRepository;
|
||||
|
||||
public SeriesStatisticsService(SeriesStatisticsRepository seriesStatisticsRepository)
|
||||
{
|
||||
_seriesStatisticsRepository = seriesStatisticsRepository;
|
||||
}
|
||||
|
||||
public List<SeriesStatistics> SeriesStatistics()
|
||||
{
|
||||
return _seriesStatisticsRepository.SeriesStatistics();
|
||||
}
|
||||
|
||||
public SeriesStatistics SeriesStatistics(int seriesId)
|
||||
{
|
||||
var stats = _seriesStatisticsRepository.SeriesStatistics(seriesId);
|
||||
|
||||
if (stats == null) return new SeriesStatistics();
|
||||
|
||||
return stats;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user