From d92b67396e52b2bb07b76dddb957540400fa2073 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 10 Aug 2016 19:11:23 +0800 Subject: [PATCH] Fix {sy} issues --- source/net/filebot/format/MediaBindingBean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index ee0ed07b..17d735e6 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -712,12 +712,12 @@ public class MediaBindingBean { @Define("sy") public List getSeasonYears() throws Exception { - return getEpisodeList().stream().filter(e -> getSeasonNumber().equals(e.getSeason()) && e.getAirdate() != null).map(e -> e.getAirdate().getYear()).sorted().distinct().collect(toList()); + return getEpisodeList().stream().filter(e -> isRegular(e) && e.getSeason().equals(getSeasonNumber()) && e.getAirdate() != null).map(e -> e.getAirdate().getYear()).sorted().distinct().collect(toList()); } @Define("sc") public Integer getSeasonCount() throws Exception { - return getEpisodeList().stream().map(Episode::getSeason).filter(Objects::nonNull).max(Integer::compare).get(); + return getEpisodeList().stream().filter(e -> isRegular(e) && e.getSeason() != null).map(Episode::getSeason).max(Integer::compare).get(); } @Define("localize")