Skip to content

Commit

Permalink
add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Proxwian committed Feb 6, 2024
1 parent a8bfcb5 commit 4ecaf1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/reducers/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,9 @@ export function processForgeManifest(instanceName) {
await new Promise(resolve => setTimeout(resolve, 5000));
}

const modManifest = await getMirrorAddon(v.id);
log.log('try to download mod from mirror:' + item.id);

const modManifest = await getMirrorAddon(item.id);
const isResourcePack = item.classId === 12;
const isShaderPack = item.classId === 6552;
const destFile = path.join(
Expand All @@ -2007,6 +2009,8 @@ export function processForgeManifest(instanceName) {
isResourcePack ? 'resourcepacks' : isShaderPack ? 'shaderpacks' : 'mods',
modManifest.fileName
);

log.log('destFile:' + modManifest.fileName);

const fileExists = await fse.pathExists(destFile);

Expand All @@ -2021,7 +2025,9 @@ export function processForgeManifest(instanceName) {
// optedOutMods.push({ addon, modManifest: normalizedModData });
// return;
// }
log.log('download url:' + modManifest.downloadUrl);
await downloadFile(destFile, modManifest.downloadUrl);
log.log('downloaded!');
modManifests = modManifests.concat(
normalizeModData(modManifest, item.id, addon.name)
);
Expand Down

0 comments on commit 4ecaf1a

Please sign in to comment.