1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* fix NPE

This commit is contained in:
Reinhard Pointner 2014-07-24 14:47:40 +00:00
parent 931a5f04a3
commit 85ad8ae67b

View File

@ -555,9 +555,9 @@ public class MediaBindingBean {
if (metaInfo == null) {
try {
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)
metaInfo = WebServices.TheMovieDB.getMovieInfo(getMovie(), getMovie().getLanguage(), true);
metaInfo = WebServices.TheMovieDB.getMovieInfo(getMovie(), getMovie().getLanguage() == null ? Locale.ENGLISH : getMovie().getLanguage(), true);
} catch (Exception e) {
throw new RuntimeException("Failed to retrieve metadata: " + infoObject, e);
}