X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FBasicSupportImages.java;h=4b7eeba36574f084ee6c044b1d1dd4ced798416e;hb=413bcc29038d9c46c785142332839d41fd3c10e6;hp=69a7c86720002b18c36bd2a4a79ee72353984429;hpb=c4cefaa04ec122fc02efb6542451a31fdf722c32;p=nikiroo-utils.git 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