mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-09-30 07:58:35 +02:00
Added option to load NUSTitlesRemote without decrypting anything (or parsing the FST) ( => for downloading)
This commit is contained in:
parent
7e07765fa1
commit
abd218fa10
@ -36,4 +36,5 @@ public class NUSTitleConfig {
|
|||||||
private long titleID = 0x0L;
|
private long titleID = 0x0L;
|
||||||
|
|
||||||
private WoomyInfo woomyInfo;
|
private WoomyInfo woomyInfo;
|
||||||
|
private boolean noDecryption;
|
||||||
}
|
}
|
||||||
|
@ -48,18 +48,21 @@ abstract class NUSTitleLoader {
|
|||||||
throw new Exception();
|
throw new Exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.isNoDecryption()) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
Ticket ticket = config.getTicket();
|
Ticket ticket = config.getTicket();
|
||||||
if (ticket == null) {
|
if (ticket == null) {
|
||||||
ticket = Ticket.parseTicket(dataProvider.getRawTicket());
|
ticket = Ticket.parseTicket(dataProvider.getRawTicket());
|
||||||
}
|
}
|
||||||
result.setTicket(ticket);
|
result.setTicket(ticket);
|
||||||
// System.out.println(ticket);
|
|
||||||
|
|
||||||
Content fstContent = tmd.getContentByIndex(0);
|
Content fstContent = tmd.getContentByIndex(0);
|
||||||
|
|
||||||
InputStream fstContentEncryptedStream = dataProvider.getInputStreamFromContent(fstContent, 0);
|
InputStream fstContentEncryptedStream = dataProvider.getInputStreamFromContent(fstContent, 0);
|
||||||
if (fstContentEncryptedStream == null) {
|
if (fstContentEncryptedStream == null) {
|
||||||
|
log.warning("FST is null");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,12 +39,17 @@ public final class NUSTitleLoaderRemote extends NUSTitleLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static NUSTitle loadNUSTitle(long titleID, int version, Ticket ticket) throws Exception {
|
public static NUSTitle loadNUSTitle(long titleID, int version, Ticket ticket) throws Exception {
|
||||||
|
return loadNUSTitle(titleID, Settings.LATEST_TMD_VERSION, ticket, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static NUSTitle loadNUSTitle(long titleID, int version, Ticket ticket, boolean noEncryption) throws Exception {
|
||||||
NUSTitleLoader loader = new NUSTitleLoaderRemote();
|
NUSTitleLoader loader = new NUSTitleLoaderRemote();
|
||||||
NUSTitleConfig config = new NUSTitleConfig();
|
NUSTitleConfig config = new NUSTitleConfig();
|
||||||
|
|
||||||
config.setVersion(version);
|
config.setVersion(version);
|
||||||
config.setTitleID(titleID);
|
config.setTitleID(titleID);
|
||||||
config.setTicket(ticket);
|
config.setTicket(ticket);
|
||||||
|
config.setNoDecryption(noEncryption);
|
||||||
|
|
||||||
return loader.loadNusTitle(config);
|
return loader.loadNusTitle(config);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user