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
tui: fix meta/story use
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
BasicReader.java
diff --git
a/src/be/nikiroo/fanfix/reader/BasicReader.java
b/src/be/nikiroo/fanfix/reader/BasicReader.java
index e9100e2e036a2bb7456bf0ab7be4670de9d87186..778b6338b108f847bea745fbe8fe04c77a0454ec 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/BasicReader.java
+++ b/
src/be/nikiroo/fanfix/reader/BasicReader.java
@@
-71,7
+71,7
@@
public abstract class BasicReader implements Reader {
}
@Override
}
@Override
- public MetaData getMeta() {
+ public
synchronized
MetaData getMeta() {
return meta;
}
return meta;
}
@@
-91,18
+91,18
@@
public abstract class BasicReader implements Reader {
}
@Override
}
@Override
- public synchronized void setMeta(URL
source
, Progress pg)
+ public synchronized void setMeta(URL
url
, Progress pg)
throws IOException {
throws IOException {
- BasicSupport support = BasicSupport.getSupport(
source
);
+ BasicSupport support = BasicSupport.getSupport(
url
);
if (support == null) {
if (support == null) {
- throw new IOException("URL not supported: " +
source
.toString());
+ throw new IOException("URL not supported: " +
url
.toString());
}
}
- story = support.process(
source,
pg);
+ story = support.process(pg);
if (story == null) {
throw new IOException(
"Cannot retrieve story from external source: "
if (story == null) {
throw new IOException(
"Cannot retrieve story from external source: "
- +
source
.toString());
+ +
url
.toString());
}
meta = story.getMeta();
}
meta = story.getMeta();
@@
-267,6
+267,8
@@
public abstract class BasicReader implements Reader {
for (String starter : new String[] { "xdg-open", "open", "see",
"start", "run" }) {
try {
for (String starter : new String[] { "xdg-open", "open", "see",
"start", "run" }) {
try {
+ Instance.getTraceHandler().trace(
+ "starting external program");
Runtime.getRuntime().exec(
new String[] { starter, target.getAbsolutePath() });
ok = true;
Runtime.getRuntime().exec(
new String[] { starter, target.getAbsolutePath() });
ok = true;
@@
-278,6
+280,7
@@
public abstract class BasicReader implements Reader {
throw new IOException("Cannot find a program to start the file");
}
} else {
throw new IOException("Cannot find a program to start the file");
}
} else {
+ Instance.getTraceHandler().trace("starting external program");
Runtime.getRuntime().exec(
new String[] { program, target.getAbsolutePath() });
}
Runtime.getRuntime().exec(
new String[] { program, target.getAbsolutePath() });
}