Skip to content

Commit

Permalink
fix ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Proxwian committed Feb 5, 2024
1 parent 4e8ad9e commit 47098bc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/common/reducers/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,7 @@ export function processForgeManifest(instanceName) {
await pMap(
manifest.files,
async item => {
if (!addonsHashmap[item.id]) return;
if (!addonsHashmap[item.projectID]) return;
let ok = false;
let tries = 0;
/* eslint-disable no-await-in-loop */
Expand All @@ -1953,10 +1953,10 @@ export function processForgeManifest(instanceName) {
await new Promise(resolve => setTimeout(resolve, 5000));
}

const addon = addonsHashmap[item.id];
const addon = addonsHashmap[item.projectID];
const isResourcePack = addon.classId === 12;
const isShaderPack = addon.classId === 6552;
const modManifest = addonsFilesHashmap[item.id];
const modManifest = addonsFilesHashmap[item.projectID];
const destFile = path.join(
_getInstancesPath(state),
instanceName,
Expand All @@ -1970,7 +1970,7 @@ export function processForgeManifest(instanceName) {
if (!modManifest.downloadUrl) {
const normalizedModData = normalizeModData(
modManifest,
item.id,
item.projectID,
addon.name
);

Expand All @@ -1979,7 +1979,7 @@ export function processForgeManifest(instanceName) {
}
await downloadFile(destFile, modManifest.downloadUrl);
modManifests = modManifests.concat(
normalizeModData(modManifest, item.id, addon.name)
normalizeModData(modManifest, item.projectID, addon.name)
);
}
const percentage =
Expand All @@ -1997,7 +1997,7 @@ export function processForgeManifest(instanceName) {
await pMap(
mirrorManifest?.files,
async item => {
if (!addonsHashmap[item.projectID]) return;
if (!addonsHashmap[item.id]) return;
let ok = false;
let tries = 0;
/* eslint-disable no-await-in-loop */
Expand All @@ -2007,10 +2007,10 @@ export function processForgeManifest(instanceName) {
await new Promise(resolve => setTimeout(resolve, 5000));
}

const addon = addonsHashmap[item.projectID];
const addon = addonsHashmap[item.id];
const isResourcePack = addon.classId === 12;
const isShaderPack = addon.classId === 6552;
const modManifest = addonsFilesHashmap[item.projectID];
const modManifest = addonsFilesHashmap[item.id];
const destFile = path.join(
_getInstancesPath(state),
instanceName,
Expand All @@ -2024,7 +2024,7 @@ export function processForgeManifest(instanceName) {
// if (!modManifest.downloadUrl) {
// const normalizedModData = normalizeModData(
// modManifest,
// item.projectID,
// item.id,
// addon.name
// );

Expand All @@ -2033,7 +2033,7 @@ export function processForgeManifest(instanceName) {
// }
await downloadFile(destFile, modManifest.downloadUrl);
modManifests = modManifests.concat(
normalizeModData(modManifest, item.projectID, addon.name)
normalizeModData(modManifest, item.id, addon.name)
);
}
const percentage =
Expand Down

0 comments on commit 47098bc

Please sign in to comment.