git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: better app exit
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
Main.java
diff --git
a/src/be/nikiroo/fanfix/Main.java
b/src/be/nikiroo/fanfix/Main.java
index 42f3924daa811bdb1bb6e121d38c01b651bf828b..522aa4c4a9b95d631edcae8c922b2ca6f99f0ddb 100644
(file)
--- a/
src/be/nikiroo/fanfix/Main.java
+++ b/
src/be/nikiroo/fanfix/Main.java
@@
-221,6
+221,9
@@
public class Main {
int diff = progress.getProgress() - current;
current += diff;
int diff = progress.getProgress() - current;
current += diff;
+ if (diff <= 0)
+ return;
+
StringBuilder builder = new StringBuilder();
for (int i = 0; i < diff; i++) {
builder.append('.');
StringBuilder builder = new StringBuilder();
for (int i = 0; i < diff; i++) {
builder.append('.');
@@
-363,9
+366,7
@@
public class Main {
syntax(false);
}
syntax(false);
}
- if (exitCode != 0) {
- System.exit(exitCode);
- }
+ System.exit(exitCode);
}
/**
}
/**
@@
-453,7
+454,7
@@
public class Main {
}
/**
}
/**
- * Start the
CLI
reader for this {@link Story}.
+ * Start the
current
reader for this {@link Story}.
*
* @param story
* the LUID of the {@link Story} in the {@link LocalLibrary}
*
* @param story
* the LUID of the {@link Story} in the {@link LocalLibrary}
@@
-479,7
+480,7
@@
public class Main {
if (chapString != null) {
try {
reader.setChapter(Integer.parseInt(chapString));
if (chapString != null) {
try {
reader.setChapter(Integer.parseInt(chapString));
- reader.read();
+ reader.read(
true
);
} catch (NumberFormatException e) {
Instance.getTraceHandler().error(
new IOException("Chapter number cannot be parsed: "
} catch (NumberFormatException e) {
Instance.getTraceHandler().error(
new IOException("Chapter number cannot be parsed: "
@@
-487,7
+488,7
@@
public class Main {
return 2;
}
} else {
return 2;
}
} else {
- reader.read();
+ reader.read(
true
);
}
} catch (IOException e) {
Instance.getTraceHandler().error(e);
}
} catch (IOException e) {
Instance.getTraceHandler().error(e);
@@
-518,6
+519,7
@@
public class Main {
String target, boolean infoCover, Progress pg) {
int exitCode = 0;
String target, boolean infoCover, Progress pg) {
int exitCode = 0;
+ Instance.getTraceHandler().trace("Convert: " + urlString);
String sourceName = urlString;
try {
URL source = BasicReader.getUrl(urlString);
String sourceName = urlString;
try {
URL source = BasicReader.getUrl(urlString);
@@
-538,6
+540,8
@@
public class Main {
BasicSupport support = BasicSupport.getSupport(source);
if (support != null) {
BasicSupport support = BasicSupport.getSupport(source);
if (support != null) {
+ Instance.getTraceHandler().trace(
+ "Support found: " + support.getClass());
Progress pgIn = new Progress();
Progress pgOut = new Progress();
if (pg != null) {
Progress pgIn = new Progress();
Progress pgOut = new Progress();
if (pg != null) {