git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update nikiroo-utils (Progress) + GuiReader perf
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
GuiReader.java
diff --git
a/src/be/nikiroo/fanfix/reader/GuiReader.java
b/src/be/nikiroo/fanfix/reader/GuiReader.java
index 73df7fb8f4a25f89c5cc45782eb3fec05ad6ca9a..8559cf112eb34b47dd923cf14b0011c2c4ae561b 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/GuiReader.java
+++ b/
src/be/nikiroo/fanfix/reader/GuiReader.java
@@
-93,21
+93,8
@@
class GuiReader extends BasicReader {
* in case of I/O error
*/
public void imprt(String luid, Progress pg) throws IOException {
* in case of I/O error
*/
public void imprt(String luid, Progress pg) throws IOException {
- Progress pgGetStory = new Progress();
- Progress pgSave = new Progress();
- if (pg != null) {
- pg.setMax(2);
- pg.addProgress(pgGetStory, 1);
- pg.addProgress(pgSave, 1);
- }
-
try {
try {
- Story story = getLibrary().getStory(luid, pgGetStory);
- if (story != null) {
- story = localLibrary.save(story, luid, pgSave);
- } else {
- throw new IOException("Cannot find story in Library: " + luid);
- }
+ localLibrary.imprt(getLibrary(), luid, pg);
} catch (IOException e) {
throw new IOException(
"Cannot import story from library to LocalReader library: "
} catch (IOException e) {
throw new IOException(
"Cannot import story from library to LocalReader library: "