debug: Add detailed logging to prproj analyzer
Added debug output to analyzePrproj() to show: - All media blocks found in the project (uid, filePath, isGves, isProxy, title) - Complete proxy linkage map (which .gves UIDs link to which high-res UIDs) - Raw media blocks in analysis response (_debug_mediaBlocks) - Proxy links in analysis response (_debug_proxyLinks) Also added console.log output for all media blocks and proxy links to help diagnose why high-res blocks aren't being found/linked. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a90177fd93
commit
c323872a0f
1 changed files with 27 additions and 1 deletions
|
|
@ -339,6 +339,19 @@ async function analyzePrproj(prprojBuffer) {
|
|||
const gvesEntries = Object.values(mediaBlocks).filter(m => m.isGves);
|
||||
const hiresEntries = Object.values(mediaBlocks).filter(m => m.isProxy);
|
||||
|
||||
// Debug: log all media blocks found
|
||||
console.log('=== DEBUG: All Media Blocks ===');
|
||||
Object.entries(mediaBlocks).forEach(([uid, block]) => {
|
||||
console.log(`UID: ${uid}`);
|
||||
console.log(` FilePath: ${block.filePath}`);
|
||||
console.log(` IsGves: ${block.isGves}`);
|
||||
console.log(` IsProxy: ${block.isProxy}`);
|
||||
console.log(` Title: ${block.title}`);
|
||||
console.log('---');
|
||||
});
|
||||
console.log('=== DEBUG: Proxy Links ===');
|
||||
console.log(JSON.stringify(proxyLinks, null, 2));
|
||||
|
||||
// Deduplicate mappings by .gves path (multiple blocks can share the same path)
|
||||
const mappings = [];
|
||||
const seenGvesPaths = new Set();
|
||||
|
|
@ -363,6 +376,16 @@ async function analyzePrproj(prprojBuffer) {
|
|||
}
|
||||
}
|
||||
|
||||
// Debug: include all media blocks so we can see the structure
|
||||
const allMediaBlocks = Object.entries(mediaBlocks).map(([uid, block]) => ({
|
||||
uid,
|
||||
filePath: block.filePath,
|
||||
isGves: block.isGves,
|
||||
isProxy: block.isProxy,
|
||||
title: block.title,
|
||||
implementationID: block.implementationID
|
||||
}));
|
||||
|
||||
return {
|
||||
totalMediaBlocks: Object.keys(mediaBlocks).length,
|
||||
gvesReferences: gvesEntries.length,
|
||||
|
|
@ -370,7 +393,10 @@ async function analyzePrproj(prprojBuffer) {
|
|||
mappedPairs: mappings.length,
|
||||
unmappedGves: unmappedPaths.size,
|
||||
mappings,
|
||||
hiresFormats: [...new Set(mappings.map(m => m.hiresExtension))]
|
||||
hiresFormats: [...new Set(mappings.map(m => m.hiresExtension))],
|
||||
// Debug: include raw media blocks
|
||||
_debug_mediaBlocks: allMediaBlocks,
|
||||
_debug_proxyLinks: proxyLinks
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue