mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Fixed test and sample decks
This commit is contained in:
parent
3a1b741509
commit
8b2bc064cd
7 changed files with 30 additions and 20 deletions
|
|
@ -115,11 +115,12 @@ public final class MtgJson {
|
|||
if (stream == null) {
|
||||
File file = new File(filename);
|
||||
if (!file.exists()) {
|
||||
System.out.println("Downloading " + filename + " to " + file.getAbsolutePath());
|
||||
URLConnection connection = new URL("https://mtgjson.com/files/" + filename).openConnection();
|
||||
connection.setRequestProperty("user-agent", "xmage");
|
||||
InputStream download = connection.getInputStream();
|
||||
Files.copy(download, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
System.out.println("Downloaded " + filename + " to " + file.getAbsolutePath());
|
||||
System.out.println("Downloading DONE");
|
||||
} else {
|
||||
System.out.println("Using " + filename + " from " + file.getAbsolutePath());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue