1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 08:25:02 -04:00

* added {ny} convenience binding as a shorthand for {n} ({y})

This commit is contained in:
Reinhard Pointner 2015-11-05 05:14:07 +00:00
parent d6db7189db
commit a97ecb2a29

View File

@ -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();