From e090e76afd5a124799374a138442ae3dbbfaddf4 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 16 Dec 2012 13:46:06 +0000 Subject: [PATCH] * fix potential null problems --- website/scripts/lib/htpc.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/scripts/lib/htpc.groovy b/website/scripts/lib/htpc.groovy index ed3dc627..7dd15b9c 100644 --- a/website/scripts/lib/htpc.groovy +++ b/website/scripts/lib/htpc.groovy @@ -133,7 +133,7 @@ def fetchMovieArtwork(outputFile, movieInfo, category, language) { def fetchAllMovieArtwork(outputFolder, movieInfo, category, language) { // select and fetch artwork def artwork = TheMovieDB.getArtwork(movieInfo.id as String) - def selection = [language, 'en', null].findResults{ l -> artwork.findAll{ (l == it.language || l == null) && it.category == category } }.flatten().unique() + def selection = [language, 'en', null].findResults{ l -> artwork.findAll{ (l == it.language || l == null) && it.category == category } }.flatten().findAll{ it?.url }.unique() if (selection == null) { println "Artwork not found: $outputFolder" return null