* added {ny} convenience binding as a shorthand for {n} ({y})
This commit is contained in:
parent
d6db7189db
commit
a97ecb2a29
|
@ -109,6 +109,13 @@ public class MediaBindingBean {
|
||||||
return null;
|
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")
|
@Define("s")
|
||||||
public Integer getSeasonNumber() {
|
public Integer getSeasonNumber() {
|
||||||
return getEpisode().getSeason();
|
return getEpisode().getSeason();
|
||||||
|
|
Loading…
Reference in New Issue