CBZ: fix meta for non-images documents
[fanfix.git] / src / be / nikiroo / fanfix / supported / Epub.java
index ba56cfb77540ac100e25a3ab4760544529ffea52..8ae4c6c37052c5569674804b3be5d4fa3244f343 100644 (file)
@@ -196,11 +196,12 @@ class Epub extends InfoText {
                        meta.setUrl(url);
                        meta.setTitle(title);
                        meta.setAuthor(author);
+                       meta.setImageDocument(isImagesDocumentByDefault());
                }
        }
 
        @Override
-       protected void close() throws IOException {
+       protected void close() {
                if (tmp != null && tmp.exists()) {
                        if (!tmp.delete()) {
                                tmp.deleteOnExit();
@@ -210,7 +211,11 @@ class Epub extends InfoText {
                tmp = null;
 
                if (fakeIn != null) {
-                       fakeIn.close();
+                       try {
+                               fakeIn.close();
+                       } catch (Exception e) {
+                               Instance.getTraceHandler().error(e);
+                       }
                }
 
                super.close();
@@ -227,4 +232,8 @@ class Epub extends InfoText {
        protected boolean getCover() {
                return true;
        }
+
+       protected boolean isImagesDocumentByDefault() {
+               return false;
+       }
 }