From 05a0e59e26757b7b511d930a4218365fe7cc528d Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sat, 20 Aug 2022 13:26:49 -0500 Subject: [PATCH] Include result screenshot in data (#8) Co-authored-by: sigonasr2 --- ArcadeReader.java | 1 + sigServer.java | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ArcadeReader.java b/ArcadeReader.java index a537857..d0ea92a 100644 --- a/ArcadeReader.java +++ b/ArcadeReader.java @@ -698,6 +698,7 @@ public class ArcadeReader { try { img = ImageIO.read(p.toFile()); Reader newImg = interpret(img); + newImg.result_screenshot=p; //Path getGamePath = gamePath(newImg); newImg.interpretBoxes(p); HashMap>> DATA = sigPlace.SONG_DATABASE; diff --git a/sigServer.java b/sigServer.java index 65b48f2..c9e000d 100644 --- a/sigServer.java +++ b/sigServer.java @@ -146,13 +146,11 @@ public class sigServer { if (!wroteData) { System.out.println("Upload failed!"); - in.close(); CreateRequest(client,"400","Bad Request",Paths.get(sigPlace.OUTDIR,"testfile.html")); return; } else { System.out.println("Saving upload to "+myFile); if (filename.contains(".png")) { - in.close(); CreateRequest(client,"200","OK",Paths.get(sigPlace.OUTDIR,"testfile.html")); ArcadeReader.submitToDatabase(Paths.get(sigPlace.ARCADEDIR,filename)); System.out.println("Submitted to the database!");