Exemplo n.º 1
0
        private List <SeriesResource> AllSeries()
        {
            var seriesStats     = _seriesStatisticsService.SeriesStatistics();
            var seriesResources = ToListResource(_seriesService.GetAllSeries);

            MapCoversToLocal(seriesResources.ToArray());
            LinkSeriesStatistics(seriesResources, seriesStats);

            return(seriesResources);
        }
Exemplo n.º 2
0
        private List <SeriesResource> AllSeries()
        {
            var seriesStats     = _seriesStatisticsService.SeriesStatistics();
            var seriesResources = _seriesService.GetAllSeries().ToResource();

            MapCoversToLocal(seriesResources.ToArray());
            LinkSeriesStatistics(seriesResources, seriesStats);
            PopulateAlternateTitles(seriesResources);

            return(seriesResources);
        }
Exemplo n.º 3
0
        private List <SeriesResource> AllSeries()
        {
            var includeSeasonImages = Request.GetBooleanQueryParameter("includeSeasonImages");
            var seriesStats         = _seriesStatisticsService.SeriesStatistics();
            var seriesResources     = _seriesService.GetAllSeries().Select(s => s.ToResource(includeSeasonImages)).ToList();

            MapCoversToLocal(seriesResources.ToArray());
            LinkSeriesStatistics(seriesResources, seriesStats);
            PopulateAlternateTitles(seriesResources);

            return(seriesResources);
        }
Exemplo n.º 4
0
        private List <SeriesResource> AllSeries()
        {
            var tvdbId = Request.GetIntegerQueryParameter("tvdbId");
            var includeSeasonImages = Request.GetBooleanQueryParameter("includeSeasonImages");
            var seriesStats         = _seriesStatisticsService.SeriesStatistics();
            var seriesResources     = new List <SeriesResource>();

            if (tvdbId > 0)
            {
                seriesResources.AddIfNotNull(_seriesService.FindByTvdbId(tvdbId).ToResource(includeSeasonImages));
            }
            else
            {
                seriesResources.AddRange(_seriesService.GetAllSeries().Select(s => s.ToResource(includeSeasonImages)));
            }

            MapCoversToLocal(seriesResources.ToArray());
            LinkSeriesStatistics(seriesResources, seriesStats);
            PopulateAlternateTitles(seriesResources);

            return(seriesResources);
        }