Remove or move java.awt dependencies
[nikiroo-utils.git] / src / be / nikiroo / fanfix / supported / InfoReader.java
index ccffd7c9d27205713cfe6e623b3a8c4c56532aac..b65256ca4b6a3a4db4e836113fe064587be35fbf 100644 (file)
@@ -56,8 +56,11 @@ public class InfoReader {
                meta.setType(getInfoTag(in, "TYPE"));
                meta.setImageDocument(getInfoTagBoolean(in, "IMAGES_DOCUMENT", false));
                if (withCover) {
-                       meta.setCover(BasicSupport.getImage(null, sourceInfoFile,
-                                       getInfoTag(in, "COVER")));
+                       String infoTag = getInfoTag(in, "COVER");
+                       if (infoTag != null && !infoTag.trim().isEmpty()) {
+                               meta.setCover(BasicSupport.getImage(null, sourceInfoFile,
+                                               infoTag));
+                       }
                        // Second chance: try to check for a cover next to the info file
                        if (meta.getCover() == null) {
                                String info = sourceInfoFile.getFile().toString();