*/
public void refresh(URL url, BasicSupport support, boolean stable)
throws IOException {
- if (check(url, stable)) {
+ if (!check(url, stable)) {
open(url, url, support, stable, null, null, null).close();
}
}
import java.util.List;
import be.nikiroo.utils.Image;
+import be.nikiroo.utils.StringUtils;
/**
* The meta data associated to a {@link Story} object.
String cover = "none";
if (getCover() != null) {
- cover = " bytes";
-
- int size = getCover().getData().length;
- if (size > 1000) {
- size /= 1000;
- cover = " kb";
- if (size > 1000) {
- size /= 1000;
- cover = " mb";
- }
- }
-
- cover = size + cover;
+ cover = StringUtils.formatNumber(getCover().getData().length)
+ + "bytes";
}
return String.format(
// try for files
if (source != null) {
try {
-
String relPath = null;
String absPath = null;
try {
package be.nikiroo.fanfix.supported;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import be.nikiroo.fanfix.data.Story;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.utils.Image;
-import be.nikiroo.utils.streams.MarkableFileInputStream;
import be.nikiroo.utils.Progress;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
/**
* Support class for CBZ files (works better with CBZ created with this program,