mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-04 16:35:08 -05:00
Default to {n} if {y} is undefined
This commit is contained in:
parent
26be12bda8
commit
a615b362db
@ -135,11 +135,16 @@ public class MediaBindingBean {
|
||||
|
||||
@Define("ny")
|
||||
public String getNameWithYear() {
|
||||
String n = getName().toString();
|
||||
String y = " (" + getYear().toString() + ")";
|
||||
String n = getName();
|
||||
try {
|
||||
String y = String.format(" (%d)", getYear());
|
||||
|
||||
// account for TV Shows that contain the year in the series name, e.g. Doctor Who (2005)
|
||||
return n.endsWith(y) ? n : n + y;
|
||||
// account for TV Shows that contain the year in the series name, e.g. Doctor Who (2005)
|
||||
return n.endsWith(y) ? n : n + y;
|
||||
} catch (Exception e) {
|
||||
// default to {n} if {y} is undefined
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
@Define("s")
|
||||
|
Loading…
Reference in New Issue
Block a user