1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 16:58:51 -05:00

Make {languages} binding work for Episode objects as well

This commit is contained in:
Reinhard Pointner 2016-02-05 11:15:12 +00:00
parent 7c292e631e
commit 3152a69152

View File

@ -533,7 +533,7 @@ public class MediaBindingBean {
@Define("languages")
public Object getSpokenLanguages() {
List<?> languages = (List<?>) getMetaInfo().getProperty("spokenLanguages");
List<?> languages = infoObject instanceof Movie ? (List<?>) getMetaInfo().getProperty("spokenLanguages") : singletonList(getMetaInfo().getProperty("language"));
return languages.stream().map(it -> new Locale(it.toString()).getDisplayLanguage()).collect(toList());
}