Include result screenshot in data (#8)

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 2 years ago
parent bba4c15692
commit 05a0e59e26
  1. 1
      ArcadeReader.java
  2. 2
      sigServer.java

@ -698,6 +698,7 @@ public class ArcadeReader {
try { try {
img = ImageIO.read(p.toFile()); img = ImageIO.read(p.toFile());
Reader newImg = interpret(img); Reader newImg = interpret(img);
newImg.result_screenshot=p;
//Path getGamePath = gamePath(newImg); //Path getGamePath = gamePath(newImg);
newImg.interpretBoxes(p); newImg.interpretBoxes(p);
HashMap<String,HashMap<String,List<String>>> DATA = sigPlace.SONG_DATABASE; HashMap<String,HashMap<String,List<String>>> DATA = sigPlace.SONG_DATABASE;

@ -146,13 +146,11 @@ public class sigServer {
if (!wroteData) { if (!wroteData) {
System.out.println("Upload failed!"); System.out.println("Upload failed!");
in.close();
CreateRequest(client,"400","Bad Request",Paths.get(sigPlace.OUTDIR,"testfile.html")); CreateRequest(client,"400","Bad Request",Paths.get(sigPlace.OUTDIR,"testfile.html"));
return; return;
} else { } else {
System.out.println("Saving upload to "+myFile); System.out.println("Saving upload to "+myFile);
if (filename.contains(".png")) { if (filename.contains(".png")) {
in.close();
CreateRequest(client,"200","OK",Paths.get(sigPlace.OUTDIR,"testfile.html")); CreateRequest(client,"200","OK",Paths.get(sigPlace.OUTDIR,"testfile.html"));
ArcadeReader.submitToDatabase(Paths.get(sigPlace.ARCADEDIR,filename)); ArcadeReader.submitToDatabase(Paths.get(sigPlace.ARCADEDIR,filename));
System.out.println("Submitted to the database!"); System.out.println("Submitted to the database!");

Loading…
Cancel
Save