mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Add extra try for "setless" token image (Desktop)
This commit is contained in:
@@ -88,6 +88,19 @@ public class SwingImageFetcher extends ImageFetcher {
|
|||||||
break;
|
break;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.println("Failed to download card [" + destPath + "] image: " + e.getMessage());
|
System.err.println("Failed to download card [" + destPath + "] image: " + e.getMessage());
|
||||||
|
if (urlToDownload.contains("tokens")) {
|
||||||
|
int setIndex = urlToDownload.lastIndexOf('_');
|
||||||
|
int typeIndex = urlToDownload.lastIndexOf('.');
|
||||||
|
String setlessFilename = urlToDownload.substring(0, setIndex);
|
||||||
|
String extension = urlToDownload.substring(typeIndex);
|
||||||
|
urlToDownload = setlessFilename+extension;
|
||||||
|
try {
|
||||||
|
doFetch(tofullBorder(urlToDownload));
|
||||||
|
break;
|
||||||
|
} catch (IOException t) {
|
||||||
|
System.err.println("Failed to download setless token [" + destPath + "]: " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user