add logs
This commit is contained in:
parent
03b9beef40
commit
b548ed1eca
|
|
@ -840,13 +840,36 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const {
|
|||
// DLC
|
||||
const auto dlc_entries =
|
||||
content_provider.ListEntriesFilter(TitleType::AOC, ContentRecordType::Data);
|
||||
|
||||
LOG_WARNING(Loader, "Found {} potential DLC entries for base title {:016X}", dlc_entries.size(), title_id);
|
||||
|
||||
std::vector<ContentProviderEntry> dlc_match;
|
||||
dlc_match.reserve(dlc_entries.size());
|
||||
std::copy_if(dlc_entries.begin(), dlc_entries.end(), std::back_inserter(dlc_match),
|
||||
[this](const ContentProviderEntry& entry) {
|
||||
return GetBaseTitleID(entry.title_id) == title_id &&
|
||||
content_provider.GetEntry(entry)->GetStatus() ==
|
||||
Loader::ResultStatus::Success;
|
||||
const auto base_tid = GetBaseTitleID(entry.title_id);
|
||||
const bool matches_base = base_tid == title_id;
|
||||
|
||||
if (!matches_base) {
|
||||
LOG_WARNING(Loader, "DLC {:016X} base {:016X} doesn't match title {:016X}",
|
||||
entry.title_id, base_tid, title_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto nca = content_provider.GetEntry(entry);
|
||||
if (!nca) {
|
||||
LOG_WARNING(Loader, "Failed to get NCA for DLC {:016X}", entry.title_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto status = nca->GetStatus();
|
||||
if (status != Loader::ResultStatus::Success) {
|
||||
LOG_WARNING(Loader, "DLC {:016X} NCA has status {}",
|
||||
entry.title_id, static_cast<int>(status));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
if (!dlc_match.empty()) {
|
||||
// Ensure sorted so DLC IDs show in order.
|
||||
|
|
|
|||
|
|
@ -1110,9 +1110,13 @@ void ExternalContentProvider::ScanDirectory(const VirtualDir& dir) {
|
|||
void ExternalContentProvider::ProcessNSP(const VirtualFile& file) {
|
||||
auto nsp = NSP(file);
|
||||
if (nsp.GetStatus() != Loader::ResultStatus::Success) {
|
||||
LOG_WARNING(Service_FS, "Failed to parse NSP file: {}, status: {}",
|
||||
file->GetName(), static_cast<int>(nsp.GetStatus()));
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_WARNING(Service_FS, "Processing NSP file: {}", file->GetName());
|
||||
|
||||
const auto ncas = nsp.GetNCAs();
|
||||
|
||||
std::map<u64, u32> nsp_versions;
|
||||
|
|
@ -1169,6 +1173,8 @@ void ExternalContentProvider::ProcessNSP(const VirtualFile& file) {
|
|||
const auto& [title_type, content_type] = type_pair;
|
||||
|
||||
if (title_type != TitleType::AOC && title_type != TitleType::Update) {
|
||||
LOG_WARNING(Service_FS, "Skipping entry - Title ID: {:016X}, TitleType: {}, ContentType: {} (not AOC or Update)",
|
||||
title_id, static_cast<int>(title_type), static_cast<int>(content_type));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1186,7 +1192,7 @@ void ExternalContentProvider::ProcessNSP(const VirtualFile& file) {
|
|||
version_files[{title_id, version}][content_type] = nca_file;
|
||||
}
|
||||
|
||||
LOG_DEBUG(Service_FS, "Added entry - Title ID: {:016X}, Type: {}, Content: {}",
|
||||
LOG_INFO(Service_FS, "Added external entry - Title ID: {:016X}, TitleType: {}, ContentType: {}",
|
||||
title_id, static_cast<int>(title_type), static_cast<int>(content_type));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue