From f52a5113ca71b5ead7cc46961adbc39314271633 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 7 Jan 2016 15:09:09 +0000 Subject: [PATCH] update {es} and {t} bindings --- source/net/filebot/format/MediaBindingBean.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index df93d798..ffb40dbf 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -139,7 +139,7 @@ public class MediaBindingBean { public List getEpisodeNumbers() { List n = new ArrayList(); for (Episode it : getEpisodes()) { - n.add(it.getEpisode()); + n.add(it.getEpisode() == null ? it.getSpecial() == null ? -1 : it.getSpecial() : it.getEpisode()); } return n; } @@ -161,19 +161,7 @@ public class MediaBindingBean { } // enforce title length limit by default - int limit = 150; - - // single episode format - if (getEpisodes().size() == 1) { - return truncateText(getEpisode().getTitle(), limit); - } - - // multi-episode format - Set title = new LinkedHashSet(); - for (Episode it : getEpisodes()) { - title.add(removeTrailingBrackets(it.getTitle())); - } - return truncateText(join(title, " & "), limit); + return truncateText(infoObject instanceof MultiEpisode ? SeasonEpisode.formatMultiTitle(getEpisodes()) : getEpisode().getTitle(), 150); } @Define("d")