+ /**
+ * Return the cover image if it is next to the source file.
+ *
+ * @param sourceInfoFile
+ * the source file
+ *
+ * @return the cover if present, NULL if not
+ */
+ public static Image getCoverByName(URL sourceInfoFile) {
+ String info = sourceInfoFile.getFile().toString();
+ if (info.endsWith(".info")) {
+ info = info.substring(0, info.length() - ".info".length());
+ String ext = "."
+ + Instance.getConfig().getString(Config.IMAGE_FORMAT_COVER)
+ .toLowerCase();
+ return BasicSupportHelper
+ .getImage(null, sourceInfoFile, info + ext);
+ }
+
+ return null;
+ }
+