import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.IOUtils;
+import be.nikiroo.utils.ImageUtils;
import be.nikiroo.utils.MarkableFileInputStream;
import be.nikiroo.utils.Progress;
if (!entry.isDirectory()
&& entry.getName().startsWith(getDataPrefix())) {
String entryLName = entry.getName().toLowerCase();
-
+
boolean imageEntry = false;
for (String ext : getImageExt(false)) {
if (entryLName.endsWith(ext)) {
// Cover
if (getCover()) {
try {
- cover = IOUtils.toImage(zipIn);
+ cover = ImageUtils.fromStream(zipIn);
} catch (Exception e) {
Instance.syserr(e);
}
}
if (tmpInfo.exists()) {
- meta = InfoReader.readMeta(tmpInfo);
+ meta = InfoReader.readMeta(tmpInfo, true);
if (cover != null) {
meta.setCover(cover);
}
tmp = null;
- fakeIn.close();
+ if (fakeIn != null) {
+ fakeIn.close();
+ }
+
super.close();
}