mirror of
https://github.com/Maschell/JNUSTool.git
synced 2025-01-07 05:48: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()));
|
setLongNameFolder(String.format("%016X", getTitleID()));
|
||||||
|
|
||||||
if(tmd.isUpdate()){
|
|
||||||
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
|
byte[] metaxml = fst.metaFENtry.downloadAsByteArray();
|
||||||
if(metaxml != null){
|
if(metaxml != null){
|
||||||
InputStream bis = new ByteArrayInputStream(metaxml);
|
InputStream bis = new ByteArrayInputStream(metaxml);
|
||||||
NUSTitleInformation nusinfo = readMeta(bis);
|
NUSTitleInformation nusinfo = readMeta(bis);
|
||||||
String folder = nusinfo.getLongnameEN() + " [" + nusinfo.getID6() + "]";
|
String folder = nusinfo.getLongnameEN() + " [" + nusinfo.getID6() + "]";
|
||||||
String subfolder = "/" + "updates" + "/" + "v" + tmd.titleVersion;
|
String subfolder = "";
|
||||||
setTargetPath(folder + subfolder);
|
if(tmd.isUpdate()) subfolder = "/" + "updates" + "/" + "v" + tmd.titleVersion;
|
||||||
setLongNameFolder(folder);
|
setTargetPath(folder + subfolder);
|
||||||
}
|
setLongNameFolder(folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Settings.downloadContent){
|
if(Settings.downloadContent){
|
||||||
@ -201,15 +201,20 @@ public class NUSTitle {
|
|||||||
Util.createSubfolder(getContentPath());
|
Util.createSubfolder(getContentPath());
|
||||||
|
|
||||||
Downloader.getInstance().downloadTMD(titleID,version,getContentPath());
|
Downloader.getInstance().downloadTMD(titleID,version,getContentPath());
|
||||||
Downloader.getInstance().downloadTicket(titleID,getContentPath());
|
|
||||||
|
|
||||||
tmd.downloadContents(progress);
|
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) {
|
NUSTitleInformation readMeta(InputStream bis) {
|
||||||
|
@ -164,7 +164,7 @@ public class TitleMetaData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isUpdate() {
|
public boolean isUpdate() {
|
||||||
return (titleID & 0x5000000000000L) == 0x5000000000000L;
|
return (titleID & 0x5000E00000000L) == 0x5000E00000000L;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadContents(Progress progress) throws IOException{
|
public void downloadContents(Progress progress) throws IOException{
|
||||||
|
Loading…
Reference in New Issue
Block a user