mirror of
https://github.com/Maschell/JNUSTool.git
synced 2025-01-05 21:08:18 +01:00
Other small fixes
This commit is contained in:
parent
146de37d27
commit
bc5c84498e
BIN
jar/JNUSTool.jar
BIN
jar/JNUSTool.jar
Binary file not shown.
@ -169,16 +169,16 @@ public class NUSTitle {
|
||||
|
||||
setLongNameFolder(String.format("%016X", getTitleID()));
|
||||
|
||||
if(tmd.isUpdate()){
|
||||
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
|
||||
if(metaxml != null){
|
||||
InputStream bis = new ByteArrayInputStream(metaxml);
|
||||
NUSTitleInformation nusinfo = readMeta(bis);
|
||||
String folder = nusinfo.getLongnameEN() + " [" + nusinfo.getID6() + "]";
|
||||
String subfolder = "/" + "updates" + "/" + "v" + tmd.titleVersion;
|
||||
setTargetPath(folder + subfolder);
|
||||
setLongNameFolder(folder);
|
||||
}
|
||||
|
||||
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
|
||||
if(metaxml != null){
|
||||
InputStream bis = new ByteArrayInputStream(metaxml);
|
||||
NUSTitleInformation nusinfo = readMeta(bis);
|
||||
String folder = nusinfo.getLongnameEN() + " [" + nusinfo.getID6() + "]";
|
||||
String subfolder = "";
|
||||
if(tmd.isUpdate()) subfolder = "/" + "updates" + "/" + "v" + tmd.titleVersion;
|
||||
setTargetPath(folder + subfolder);
|
||||
setLongNameFolder(folder);
|
||||
}
|
||||
|
||||
if(Settings.downloadContent){
|
||||
@ -201,15 +201,20 @@ public class NUSTitle {
|
||||
Util.createSubfolder(getContentPath());
|
||||
|
||||
Downloader.getInstance().downloadTMD(titleID,version,getContentPath());
|
||||
Downloader.getInstance().downloadTicket(titleID,getContentPath());
|
||||
|
||||
tmd.downloadContents(progress);
|
||||
try{
|
||||
Downloader.getInstance().downloadTicket(titleID,getContentPath());
|
||||
FileOutputStream fos = new FileOutputStream(getContentPath() + "/title.cert");
|
||||
fos.write(ticket.cert0);
|
||||
fos.write(tmd.cert);
|
||||
fos.write(ticket.cert1);
|
||||
fos.close();
|
||||
}catch(Exception e){
|
||||
Logger.log("Random error.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
FileOutputStream fos = new FileOutputStream(getContentPath() +"/title.cert");
|
||||
fos.write(ticket.cert0);
|
||||
fos.write(tmd.cert);
|
||||
fos.write(ticket.cert1);
|
||||
fos.close();
|
||||
}
|
||||
|
||||
NUSTitleInformation readMeta(InputStream bis) {
|
||||
|
@ -164,7 +164,7 @@ public class TitleMetaData {
|
||||
}
|
||||
|
||||
public boolean isUpdate() {
|
||||
return (titleID & 0x5000000000000L) == 0x5000000000000L;
|
||||
return (titleID & 0x5000E00000000L) == 0x5000E00000000L;
|
||||
}
|
||||
|
||||
public void downloadContents(Progress progress) throws IOException{
|
||||
|
Loading…
Reference in New Issue
Block a user