Fixed some bugs, updated the CSV

This commit is contained in:
Maschell 2016-08-24 21:27:35 +02:00
parent f45def88b4
commit 7ad44f51b9
10 changed files with 44 additions and 24 deletions

4
.gitignore vendored
View File

@ -51,6 +51,6 @@ bin
/tmp*
UpdateGrabber.java
updatetitles.csv
src/de/mas/jnustool/StarterPRIATE.java
jar/tmp*
src/de/mas/jnustool/XMLGEN.java
src/de/mas/jnustool/gui/UpdateChooserSpecial.java
src/de/mas/jnustool/StarterSpecial.java

Binary file not shown.

View File

@ -168,7 +168,7 @@
0005000E-1014CF00;2;WUP;00HL;WUP-U-WCDE;WCDEHL;Coaster Crazy Deluxe;16,32
0005000E-1014D100;4;WUP;00CS;WUP-U-WKTP;WKTPCS;Scram Kitty and his Buddy on Rails;17,32
0005000E-1014D900;1;WUP;008P;WUP-P-APTJ;APTJ8P;PUYOPUYOTETRIS;16,32
0005000E-1014DA00;1;WUP;0008;WUP-U-AMFJ;AMFJ08;Monster Hunter Frontier G;80,96,112,128,144,160,176,192,208,224,240,256,288,304,320,336,352,368,400,432,448,464,480,496,512,528,544,560,576,592,608,624,640,656,672,688,704,720,736,752,768,784,800,816,832,848,864,880,896,912,928,944,960,976,992,1008,1024,1040,1056,1072,1088,1104,1120,1136,1152,1168,1184,1200,1216,1232,1248,1264,1280,1296,1312,1328,1344,1360,1376,1392,1408,1424,1440,1456,1472,1488,1504,1520,1536,1552
0005000E-1014DA00;1;WUP;0008;WUP-U-AMFJ;AMFJ08;Monster Hunter Frontier G;80,96,112,128,144,160,176,192,208,224,240,256,288,304,320,336,352,368,400,432,448,464,480,496,512,528,544,560,576,592,608,624,640,656,672,688,704,720,736,752,768,784,800,816,832,848,864,880,896,912,928,944,960,976,992,1008,1024,1040,1056,1072,1088,1104,1120,1136,1152,1168,1184,1200,1216,1232,1248,1264,1280,1296,1312,1328,1344,1360,1376,1392,1408,1424,1440,1456,1472,1488,1504,1520,1536,1552,1568,1584
0005000E-1014DE00;2;WUP;00WR;WUP-U-ALAE;ALAEWR;The LEGO® Movie Videogame;16
0005000E-1014E000;4;WUP;00WR;WUP-U-ALAP;ALAPWR;The LEGO® Movie Videogame;18
0005000E-1014E100;4;WUP;00AF;WUP-U-ADVP;ADVPAF;Adventure Time: Explore the Dungeon Because I Don't Know!;16
@ -303,11 +303,11 @@
0005000E-101B9000;2;WUP;0041;WUP-P-AJ6E;AJ6E41;JUST DANCE® 2016;16,32
0005000E-101B9800;4;WUP;0041;WUP-P-AJ6P;AJ6P41;JUST DANCE® 2016;16,32
0005000E-101B9900;4;WUP;00AF;WUP-P-APHP;APHPAF;LOST REAVERS;16
0005000E-101BA400;2;WUP;0052;WUP-P-AGNE;AGNE52;Guitar Hero Live;16,32,48,64,80
0005000E-101BA400;2;WUP;0052;WUP-P-AGNE;AGNE52;Guitar Hero Live;16,32,48,64,80,96
0005000E-101BAA00;2;WUP;010C;WUP-U-ATTE;ATTE0C;Totem Topple;16,33
0005000E-101BB300;4;WUP;008V;WUP-P-WLSP;WLSP8V;ZaciSa: Defense of the Crayon Dimension!;16
0005000E-101BB800;4;WUP;011A;WUP-P-BEQP;BEQP1A;Elliot Quest;16,32,48,64,80,97
0005000E-101BC600;4;WUP;0052;WUP-P-AGNP;AGNP52;Guitar Hero Live;18,32,48,64,80
0005000E-101BC600;4;WUP;0052;WUP-P-AGNP;AGNP52;Guitar Hero Live;18,32,48,64,80,96
0005000E-101BE900;4;WUP;00WR;WUP-P-ALRP;ALRPWR;LEGO® MARVEL's Avengers;16,33,48,64
0005000E-101BEC00;2;WUP;0001;WUP-U-BWFE;BWFE01;Star Fox Guard;16
0005000E-101BED00;4;WUP;0001;WUP-U-BWFP;BWFP01;Star Fox Guard;16
@ -372,4 +372,4 @@
0005000E-101EA100;1;WUP;00WR;WUP-P-ALRJ;ALRJWR;LEGO® MARVEL's Avengers;18
0005000E-101ED800;2;WUP;0001;WUP-U-ASEE;ASEE01;Tokyo Mirage Sessions #FE;16
0005000E-101F2700;4;WUP;017P;WUP-P-BY2P;BY2P7P;Star Sky 2;16
0005000E-101F7700;4;WUP;017D;WUP-P-AHYP;AHYP7D;PixelMaker;16
0005000E-101F7700;4;WUP;017D;WUP-P-AHYP;AHYP7D;PixelMaker;16,32

1 0005000E-10100600 1 WUP 00AF WUP-U-AKNJ AKNJAF TEKKEN TAG TOURNAMENT 2 Wii U EDITION 16
168 0005000E-1014CF00 2 WUP 00HL WUP-U-WCDE WCDEHL Coaster Crazy Deluxe 16,32
169 0005000E-1014D100 4 WUP 00CS WUP-U-WKTP WKTPCS Scram Kitty and his Buddy on Rails 17,32
170 0005000E-1014D900 1 WUP 008P WUP-P-APTJ APTJ8P PUYOPUYOTETRIS 16,32
171 0005000E-1014DA00 1 WUP 0008 WUP-U-AMFJ AMFJ08 Monster Hunter Frontier G 80,96,112,128,144,160,176,192,208,224,240,256,288,304,320,336,352,368,400,432,448,464,480,496,512,528,544,560,576,592,608,624,640,656,672,688,704,720,736,752,768,784,800,816,832,848,864,880,896,912,928,944,960,976,992,1008,1024,1040,1056,1072,1088,1104,1120,1136,1152,1168,1184,1200,1216,1232,1248,1264,1280,1296,1312,1328,1344,1360,1376,1392,1408,1424,1440,1456,1472,1488,1504,1520,1536,1552 80,96,112,128,144,160,176,192,208,224,240,256,288,304,320,336,352,368,400,432,448,464,480,496,512,528,544,560,576,592,608,624,640,656,672,688,704,720,736,752,768,784,800,816,832,848,864,880,896,912,928,944,960,976,992,1008,1024,1040,1056,1072,1088,1104,1120,1136,1152,1168,1184,1200,1216,1232,1248,1264,1280,1296,1312,1328,1344,1360,1376,1392,1408,1424,1440,1456,1472,1488,1504,1520,1536,1552,1568,1584
172 0005000E-1014DE00 2 WUP 00WR WUP-U-ALAE ALAEWR The LEGO® Movie Videogame 16
173 0005000E-1014E000 4 WUP 00WR WUP-U-ALAP ALAPWR The LEGO® Movie Videogame 18
174 0005000E-1014E100 4 WUP 00AF WUP-U-ADVP ADVPAF Adventure Time: Explore the Dungeon Because I Don't Know! 16
303 0005000E-101B9000 2 WUP 0041 WUP-P-AJ6E AJ6E41 JUST DANCE® 2016 16,32
304 0005000E-101B9800 4 WUP 0041 WUP-P-AJ6P AJ6P41 JUST DANCE® 2016 16,32
305 0005000E-101B9900 4 WUP 00AF WUP-P-APHP APHPAF LOST REAVERS 16
306 0005000E-101BA400 2 WUP 0052 WUP-P-AGNE AGNE52 Guitar Hero Live 16,32,48,64,80 16,32,48,64,80,96
307 0005000E-101BAA00 2 WUP 010C WUP-U-ATTE ATTE0C Totem Topple 16,33
308 0005000E-101BB300 4 WUP 008V WUP-P-WLSP WLSP8V ZaciSa: Defense of the Crayon Dimension! 16
309 0005000E-101BB800 4 WUP 011A WUP-P-BEQP BEQP1A Elliot Quest 16,32,48,64,80,97
310 0005000E-101BC600 4 WUP 0052 WUP-P-AGNP AGNP52 Guitar Hero Live 18,32,48,64,80 18,32,48,64,80,96
311 0005000E-101BE900 4 WUP 00WR WUP-P-ALRP ALRPWR LEGO® MARVEL's Avengers 16,33,48,64
312 0005000E-101BEC00 2 WUP 0001 WUP-U-BWFE BWFE01 Star Fox Guard 16
313 0005000E-101BED00 4 WUP 0001 WUP-U-BWFP BWFP01 Star Fox Guard 16
372 0005000E-101EA100 1 WUP 00WR WUP-P-ALRJ ALRJWR LEGO® MARVEL's Avengers 18
373 0005000E-101ED800 2 WUP 0001 WUP-U-ASEE ASEE01 Tokyo Mirage Sessions #FE 16
374 0005000E-101F2700 4 WUP 017P WUP-P-BY2P BY2P7P Star Sky 2 16
375 0005000E-101F7700 4 WUP 017D WUP-P-AHYP AHYP7D PixelMaker 16 16,32

Binary file not shown.

View File

@ -195,7 +195,13 @@ public class FEntry implements IHasName{
}
}
Logger.log("Downloading: " + String.format("%8.2f MB ", getFileLength()/1024.0/1024.0) + getFullPath());
Downloader.getInstance().downloadAndDecrypt(this,progress,false);
try{
Downloader.getInstance().downloadAndDecrypt(this,progress,false);
}catch(Exception e){
e.printStackTrace();
System.err.println(this.fst.getTmd().getNUSTitle().getLongNameFolder() + " connection failed.");
}
} catch (IOException e) {

View File

@ -25,7 +25,7 @@ import de.mas.jnustool.util.NUSTitleInformation;
import de.mas.jnustool.util.Settings;
import de.mas.jnustool.util.Util;
public class NUSTitle {
public class NUSTitle {
private TitleMetaData tmd;
private TIK ticket;
private FST fst;
@ -43,7 +43,7 @@ public class NUSTitle {
return result;
}
public NUSTitle(long titleId,int version, String key) {
public NUSTitle(long titleId,int version, String key) {
setVersion(version);
setTitleID(titleId);
if(version != -1){
@ -90,7 +90,14 @@ public class NUSTitle {
if(tmd == null){
if(Settings.downloadWhenCachedFilesMissingOrBroken){
if(Settings.useCachedFiles) Logger.log("Getting missing tmd from Server!");
tmd = new TitleMetaData(Downloader.getInstance().downloadTMDToByteArray(titleId,this.version));
try{
tmd = new TitleMetaData(Downloader.getInstance().downloadTMDToByteArray(titleId,this.version));
}catch(IllegalArgumentException e){
Logger.log("TMD wrong. Title not found");
setTitleID(0);
return;
}
}else{
Logger.log("Downloading of missing files is not enabled. Exiting");
System.exit(2);
@ -180,14 +187,20 @@ public class NUSTitle {
if(fst != null && fst.metaFENtry != null){
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
if(metaxml != null){
InputStream bis = new ByteArrayInputStream(metaxml);
NUSTitleInformation nusinfo = readMeta(bis);
//String folder = nusinfo.getLongnameEN().replaceAll("[^\\x20-\\x7E]", "") + " [" + nusinfo.getID6() + "]";
String folder = nusinfo.getLongnameEN() + " [" + nusinfo.getID6() + "]";
String subfolder = "";
if(tmd.isUpdate()) subfolder = "/" + "updates" + "/" + "v" + tmd.titleVersion;
setTargetPath(folder + subfolder);
setLongNameFolder(folder);
try{
InputStream bis = new ByteArrayInputStream(metaxml);
NUSTitleInformation nusinfo = readMeta(bis);
if(nusinfo != null){
//String folder = nusinfo.getLongnameEN().replaceAll("[^\\x20-\\x7E]", "") + " [" + nusinfo.getID6() + "]";
String folder = nusinfo.getLongnameEN() + " [" + nusinfo.getID6() + "]";
String subfolder = "";
if(tmd.isUpdate()) subfolder = "/" + "updates" + "/" + "v" + tmd.titleVersion;
setTargetPath(folder + subfolder);
setLongNameFolder(folder);
}
}catch(Exception e){
e.printStackTrace();
}
}
}
@ -252,12 +265,11 @@ public class NUSTitle {
String company_code = document.getElementsByTagName("company_code").item(0).getTextContent().toString();
String content_platform = document.getElementsByTagName("content_platform").item(0).getTextContent().toString();
String region = document.getElementsByTagName("region").item(0).getTextContent().toString();
NUSTitleInformation nusinfo = new NUSTitleInformation(Util.StringToLong(title_id),longname,ID6,proc,content_platform,company_code,Integer.parseInt(region),new String[1]);
NUSTitleInformation nusinfo = new NUSTitleInformation(Util.StringToLong(title_id),longname,ID6,proc,content_platform,company_code,(int) Util.StringToLong(region),new String[1]);
return nusinfo;
} catch (ParserConfigurationException | SAXException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Logger.log("Error while parsing the meta files");
}
return null;

View File

@ -62,6 +62,7 @@ public class Starter {
try {
title.downloadEncryptedFiles(null);
} catch (IOException e) {
e.printStackTrace();
}
System.exit(0);
}

View File

@ -59,7 +59,7 @@ public class TitleMetaData {
setTotalContentSize();
}else{
System.err.println("Invalid TMD");
Logger.log("Invalid TMD");
throw new IllegalArgumentException("Invalid TMD");
}
}

View File

@ -31,7 +31,7 @@ public class NUSGUI extends JFrame {
super();
this.setResizable(false);
setSize(600, 768);
setTitle(String.format("%016X", nus.getTitleID()));
setTitle(String.format("%016X", nus.getTitleID()));
getContentPane().setLayout(null);
JSplitPane splitPane = new JSplitPane();

View File

@ -9,6 +9,7 @@ import java.net.HttpURLConnection;
import java.net.URL;
import de.mas.jnustool.FEntry;
import de.mas.jnustool.Logger;
import de.mas.jnustool.Progress;
public class Downloader {
@ -165,7 +166,7 @@ public class Downloader {
}
inputStream.close();
}else{
System.err.println("File not found: " + fileURL);
Logger.log("File not found: " + fileURL);
}
httpConn.disconnect();
return file;