mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
update {es} and {t} bindings
This commit is contained in:
parent
b83fcad638
commit
f52a5113ca
@ -139,7 +139,7 @@ public class MediaBindingBean {
|
|||||||
public List<Integer> getEpisodeNumbers() {
|
public List<Integer> getEpisodeNumbers() {
|
||||||
List<Integer> n = new ArrayList<Integer>();
|
List<Integer> n = new ArrayList<Integer>();
|
||||||
for (Episode it : getEpisodes()) {
|
for (Episode it : getEpisodes()) {
|
||||||
n.add(it.getEpisode());
|
n.add(it.getEpisode() == null ? it.getSpecial() == null ? -1 : it.getSpecial() : it.getEpisode());
|
||||||
}
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
@ -161,19 +161,7 @@ public class MediaBindingBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// enforce title length limit by default
|
// enforce title length limit by default
|
||||||
int limit = 150;
|
return truncateText(infoObject instanceof MultiEpisode ? SeasonEpisode.formatMultiTitle(getEpisodes()) : getEpisode().getTitle(), 150);
|
||||||
|
|
||||||
// single episode format
|
|
||||||
if (getEpisodes().size() == 1) {
|
|
||||||
return truncateText(getEpisode().getTitle(), limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
// multi-episode format
|
|
||||||
Set<String> title = new LinkedHashSet<String>();
|
|
||||||
for (Episode it : getEpisodes()) {
|
|
||||||
title.add(removeTrailingBrackets(it.getTitle()));
|
|
||||||
}
|
|
||||||
return truncateText(join(title, " & "), limit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Define("d")
|
@Define("d")
|
||||||
|
Loading…
Reference in New Issue
Block a user