diff --git a/downloader.go b/downloader.go index 3d21683..eb088b7 100644 --- a/downloader.go +++ b/downloader.go @@ -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 { - titleEntry := getTitleEntryFromTid(titleID) + tEntry := getTitleEntryFromTid(titleID) progressReporter.SetTotalDownloaded(0) - progressReporter.SetGameTitle(titleEntry.Name) + progressReporter.SetGameTitle(tEntry.Name) outputDir := strings.TrimRight(outputDirectory, "/\\") 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 { return err } - if err := GenerateTicket(tikPath, titleEntry.TitleID, titleKey, titleVersion); err != nil { + if err := GenerateTicket(tikPath, tEntry.TitleID, titleKey, titleVersion); err != nil { return err } } diff --git a/gtitles.go b/gtitles.go index 8edb648..0b21aca 100644 --- a/gtitles.go +++ b/gtitles.go @@ -51,7 +51,7 @@ const ( func GetTitleEntries(category uint8) []TitleEntry { titleEntries := make([]TitleEntry, 0) for _, entry := range titleEntry { - if entry.Category == category { + if category == TITLE_CATEGORY_ALL || category == entry.Category { titleEntries = append(titleEntries, entry) } }