From a97ecb2a29a76a56bee36bd88989d1434a0bea31 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 5 Nov 2015 05:14:07 +0000 Subject: [PATCH] * added {ny} convenience binding as a shorthand for {n} ({y}) --- source/net/filebot/format/MediaBindingBean.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/net/filebot/format/MediaBindingBean.java b/source/net/filebot/format/MediaBindingBean.java index 4fc4be84..f9acbdbd 100644 --- a/source/net/filebot/format/MediaBindingBean.java +++ b/source/net/filebot/format/MediaBindingBean.java @@ -109,6 +109,13 @@ public class MediaBindingBean { return null; } + @Define("ny") + public String getNameWithYear() { + String n = getName().toString(); + String y = " (" + getYear().toString() + ")"; + return n.endsWith(y) ? n : n + y; // account for TV Shows that contain the year in the series name, e.g. Doctor Who (2005) + } + @Define("s") public Integer getSeasonNumber() { return getEpisode().getSeason();