From: Niki Roo Date: Thu, 14 Mar 2019 08:32:26 +0000 (+0100) Subject: Merge branch 'master' of github.com:nikiroo/fanfix X-Git-Tag: fanfix-2.0.0~53 X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=commitdiff_plain;h=85493b380b07146e2b36c0ffe40d2dc17a4ebdf2;hp=78e578597632e64236bd1655d745873af4eb9b91 Merge branch 'master' of github.com:nikiroo/fanfix --- diff --git a/TODO.md b/TODO.md index 19202dc..ff3396b 100644 --- a/TODO.md +++ b/TODO.md @@ -79,7 +79,7 @@ My current planning for Fanfix (but not everything appears on this list): - [ ] Fix eHentai "content warning" access - [ ] Fix the configuration system (for new or changed options, new or changed languages) - [ ] remote import also download the file in cache, why? - - [ ] import file in remote mode tries to import remote file!! + - [x] import file in remote mode tries to import remote file!! - [ ] import file does not find author in cbz with SUMMARY file - [ ] import file:// creates a tmp without auto-deletion in /tmp/fanfic-... diff --git a/src/be/nikiroo/fanfix/library/RemoteLibrary.java b/src/be/nikiroo/fanfix/library/RemoteLibrary.java index 71b65bf..75f98be 100644 --- a/src/be/nikiroo/fanfix/library/RemoteLibrary.java +++ b/src/be/nikiroo/fanfix/library/RemoteLibrary.java @@ -285,6 +285,13 @@ public class RemoteLibrary extends BasicLibrary { @Override // Could work (more slowly) without it public Story imprt(final URL url, Progress pg) throws IOException { + // Import the file locally if it is actually a file + if (url == null || url.getProtocol().equalsIgnoreCase("file")) { + return super.imprt(url, pg); + } + + // Import it remotely if it is an URL + if (pg == null) { pg = new Progress(); }