mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
*Fixed LQ Set Pictures download
This commit is contained in:
@@ -36,7 +36,7 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader {
|
|||||||
*/
|
*/
|
||||||
public GuiDownloadSetPicturesLQ(final JFrame frame) {
|
public GuiDownloadSetPicturesLQ(final JFrame frame) {
|
||||||
super(frame);
|
super(frame);
|
||||||
picturesPath = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final void addCardToList(ArrayList<DownloadObject> cList, CardPrinted c, String cardName)
|
protected final void addCardToList(ArrayList<DownloadObject> cList, CardPrinted c, String cardName)
|
||||||
@@ -50,6 +50,10 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader {
|
|||||||
String imgFN = CardUtil.buildFilename(c, cardName);
|
String imgFN = CardUtil.buildFilename(c, cardName);
|
||||||
boolean foundSetImage = imgFN.contains(setCode3) || imgFN.contains(setCode2);
|
boolean foundSetImage = imgFN.contains(setCode3) || imgFN.contains(setCode2);
|
||||||
|
|
||||||
|
if(picturesPath == null)
|
||||||
|
{
|
||||||
|
System.out.println("Oh snap!");
|
||||||
|
}
|
||||||
if (!foundSetImage) {
|
if (!foundSetImage) {
|
||||||
int artsCnt = c.getCard().getSetInfo(setCode3).getCopiesCount();
|
int artsCnt = c.getCard().getSetInfo(setCode3).getCopiesCount();
|
||||||
String fn = CardUtil.buildIdealFilename(cardName, c.getArtIndex(), artsCnt);
|
String fn = CardUtil.buildIdealFilename(cardName, c.getArtIndex(), artsCnt);
|
||||||
@@ -67,6 +71,10 @@ public class GuiDownloadSetPicturesLQ extends GuiDownloader {
|
|||||||
* @return an array of {@link forge.GuiDownloader.DownloadObject} objects.
|
* @return an array of {@link forge.GuiDownloader.DownloadObject} objects.
|
||||||
*/
|
*/
|
||||||
protected final DownloadObject[] getNeededImages() {
|
protected final DownloadObject[] getNeededImages() {
|
||||||
|
if(picturesPath == null)
|
||||||
|
{
|
||||||
|
picturesPath = ForgeProps.getFile(NewConstants.IMAGE_BASE).getPath();
|
||||||
|
}
|
||||||
// read token names and urls
|
// read token names and urls
|
||||||
DownloadObject[] cardTokenLQ = readFileWithNames(NewConstants.TOKEN_IMAGES, ForgeProps.getFile(NewConstants.IMAGE_TOKEN));
|
DownloadObject[] cardTokenLQ = readFileWithNames(NewConstants.TOKEN_IMAGES, ForgeProps.getFile(NewConstants.IMAGE_TOKEN));
|
||||||
ArrayList<DownloadObject> cList = new ArrayList<DownloadObject>();
|
ArrayList<DownloadObject> cList = new ArrayList<DownloadObject>();
|
||||||
|
|||||||
Reference in New Issue
Block a user