mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-21 10:45:26 -04:00
Fix GetTitleEntries
This commit is contained in:
parent
38250c8991
commit
f4df0825c1
2 changed files with 4 additions and 4 deletions
|
@ -122,10 +122,10 @@ func downloadFile(ctx context.Context, progressReporter ProgressReporter, client
|
||||||
}
|
}
|
||||||
|
|
||||||
func DownloadTitle(cancelCtx context.Context, titleID, outputDirectory string, doDecryption bool, progressReporter ProgressReporter, deleteEncryptedContents bool, logger *Logger, client *http.Client) error {
|
func DownloadTitle(cancelCtx context.Context, titleID, outputDirectory string, doDecryption bool, progressReporter ProgressReporter, deleteEncryptedContents bool, logger *Logger, client *http.Client) error {
|
||||||
titleEntry := getTitleEntryFromTid(titleID)
|
tEntry := getTitleEntryFromTid(titleID)
|
||||||
|
|
||||||
progressReporter.SetTotalDownloaded(0)
|
progressReporter.SetTotalDownloaded(0)
|
||||||
progressReporter.SetGameTitle(titleEntry.Name)
|
progressReporter.SetGameTitle(tEntry.Name)
|
||||||
|
|
||||||
outputDir := strings.TrimRight(outputDirectory, "/\\")
|
outputDir := strings.TrimRight(outputDirectory, "/\\")
|
||||||
baseURL := fmt.Sprintf("http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/%s", titleID)
|
baseURL := fmt.Sprintf("http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/%s", titleID)
|
||||||
|
@ -167,7 +167,7 @@ func DownloadTitle(cancelCtx context.Context, titleID, outputDirectory string, d
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := GenerateTicket(tikPath, titleEntry.TitleID, titleKey, titleVersion); err != nil {
|
if err := GenerateTicket(tikPath, tEntry.TitleID, titleKey, titleVersion); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ const (
|
||||||
func GetTitleEntries(category uint8) []TitleEntry {
|
func GetTitleEntries(category uint8) []TitleEntry {
|
||||||
titleEntries := make([]TitleEntry, 0)
|
titleEntries := make([]TitleEntry, 0)
|
||||||
for _, entry := range titleEntry {
|
for _, entry := range titleEntry {
|
||||||
if entry.Category == category {
|
if category == TITLE_CATEGORY_ALL || category == entry.Category {
|
||||||
titleEntries = append(titleEntries, entry)
|
titleEntries = append(titleEntries, entry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue