tui: fix meta/story use
[fanfix.git] / src / be / nikiroo / fanfix / reader / BasicReader.java
index 74a99c4005dfe45a89b3dd8b1be97e6757a8fa38..778b6338b108f847bea745fbe8fe04c77a0454ec 100644 (file)
@@ -91,18 +91,18 @@ public abstract class BasicReader implements Reader {
        }
 
        @Override
-       public synchronized void setMeta(URL source, Progress pg)
+       public synchronized void setMeta(URL url, Progress pg)
                        throws IOException {
-               BasicSupport support = BasicSupport.getSupport(source);
+               BasicSupport support = BasicSupport.getSupport(url);
                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: "
-                                                       + source.toString());
+                                                       + url.toString());
                }
 
                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 {
+                                       Instance.getTraceHandler().trace(
+                                                       "starting external program");
                                        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 {
+                       Instance.getTraceHandler().trace("starting external program");
                        Runtime.getRuntime().exec(
                                        new String[] { program, target.getAbsolutePath() });
                }