From 34b5a833f59be852a87bd282f8b80431ae8fa104 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 25 Sep 2013 17:14:27 -0700 Subject: [PATCH] SeasonCount excludes specials --- NzbDrone.Api/Series/SeriesResource.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Api/Series/SeriesResource.cs b/NzbDrone.Api/Series/SeriesResource.cs index 170fa8301..dc7cc3479 100644 --- a/NzbDrone.Api/Series/SeriesResource.cs +++ b/NzbDrone.Api/Series/SeriesResource.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using NzbDrone.Api.REST; using NzbDrone.Core.MediaCover; using NzbDrone.Core.Tv; @@ -19,9 +20,9 @@ public Int32 SeasonCount { get { - if (Seasons != null) return Seasons.Count; + if (Seasons == null) return 0; - return 0; + return Seasons.Where(s => s.SeasonNumber > 0).Count(); } }