X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FBasicSupportImages.java;h=4b7eeba36574f084ee6c044b1d1dd4ced798416e;hp=69a7c86720002b18c36bd2a4a79ee72353984429;hb=8ac3d09905c102fc1d4e6acb07bb3e0676c18931;hpb=3ddb5591128b1f30dc27c4b58c89dc06c53e5d76 diff --git a/src/be/nikiroo/fanfix/supported/BasicSupportImages.java b/src/be/nikiroo/fanfix/supported/BasicSupportImages.java index 69a7c86..4b7eeba 100644 --- a/src/be/nikiroo/fanfix/supported/BasicSupportImages.java +++ b/src/be/nikiroo/fanfix/supported/BasicSupportImages.java @@ -20,16 +20,32 @@ public class BasicSupportImages { * Check if the given resource can be a local image or a remote image, then * refresh the cache with it if it is. * + * @param support + * the support to use to download the resource (can be NULL) * @param dir * the local directory to search, if any * @param line * the resource to check * * @return the image if found, or NULL - * */ public Image getImage(BasicSupport support, File dir, String line) { URL url = getImageUrl(support, dir, line); + return getImage(support,url); + } + + /** + * Check if the given resource can be a local image or a remote image, then + * refresh the cache with it if it is. + * + * @param support + * the support to use to download the resource (can be NULL) + * @param url + * the actual URL to check (file or remote, can be NULL) + * + * @return the image if found, or NULL + */ + public Image getImage(BasicSupport support, URL url) { if (url != null) { if ("file".equals(url.getProtocol())) { if (new File(url.getPath()).isDirectory()) { @@ -58,6 +74,8 @@ public class BasicSupportImages { * Check if the given resource can be a local image or a remote image, then * refresh the cache with it if it is. * + * @param support + * the support to use to download the resource (can be NULL) * @param dir * the local directory to search, if any * @param line