* fix NPE

This commit is contained in:
Reinhard Pointner 2014-07-24 14:47:40 +00:00
parent 931a5f04a3
commit 85ad8ae67b
1 changed files with 2 additions and 2 deletions

View File

@ -555,9 +555,9 @@ public class MediaBindingBean {
if (metaInfo == null) { if (metaInfo == null) {
try { try {
if (infoObject instanceof Episode) if (infoObject instanceof Episode)
metaInfo = WebServices.TheTVDB.getSeriesInfoByName(getEpisode().getSeriesName(), getEpisode().getLanguage()); metaInfo = WebServices.TheTVDB.getSeriesInfoByName(getEpisode().getSeriesName(), getEpisode().getLanguage() == null ? Locale.ENGLISH : getEpisode().getLanguage());
if (infoObject instanceof Movie) if (infoObject instanceof Movie)
metaInfo = WebServices.TheMovieDB.getMovieInfo(getMovie(), getMovie().getLanguage(), true); metaInfo = WebServices.TheMovieDB.getMovieInfo(getMovie(), getMovie().getLanguage() == null ? Locale.ENGLISH : getMovie().getLanguage(), true);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("Failed to retrieve metadata: " + infoObject, e); throw new RuntimeException("Failed to retrieve metadata: " + infoObject, e);
} }