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
1 changed files with 1 additions and 1 deletions

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