mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-05 07:45:11 +01: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 WoomyInfo woomyInfo;
|
||||
private boolean noDecryption;
|
||||
}
|
||||
|
@ -48,18 +48,21 @@ abstract class NUSTitleLoader {
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (config.isNoDecryption()) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Ticket ticket = config.getTicket();
|
||||
if (ticket == null) {
|
||||
ticket = Ticket.parseTicket(dataProvider.getRawTicket());
|
||||
}
|
||||
result.setTicket(ticket);
|
||||
// System.out.println(ticket);
|
||||
|
||||
Content fstContent = tmd.getContentByIndex(0);
|
||||
|
||||
InputStream fstContentEncryptedStream = dataProvider.getInputStreamFromContent(fstContent, 0);
|
||||
if (fstContentEncryptedStream == null) {
|
||||
|
||||
log.warning("FST is 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 {
|
||||
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();
|
||||
NUSTitleConfig config = new NUSTitleConfig();
|
||||
|
||||
config.setVersion(version);
|
||||
config.setTitleID(titleID);
|
||||
config.setTicket(ticket);
|
||||
config.setNoDecryption(noEncryption);
|
||||
|
||||
return loader.loadNusTitle(config);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user