Skip to content

Commit

Permalink
fix: arch x64 instead of x86 (#2)
Browse files Browse the repository at this point in the history
x86 got discontinued a few months ago which would explain why no more updates are being tracked. See: https://support.discord.com/hc/en-us/articles/17997797368471--Known-Issue-Support-for-32-bit-Windows-Operating-Systems
  • Loading branch information
ioj4 authored Nov 14, 2024
1 parent ac4eb18 commit af073dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const extractAsars = dir => {


export default async (channel, mod, version) => {
const manifest = await fetchJson(`https://discord.com/api/updates/distributions/app/manifests/latest?platform=win&channel=${channel}&arch=x86`);
const manifest = await fetchJson(`https://discord.com/api/updates/distributions/app/manifests/latest?platform=win&channel=${channel}&arch=x64`);

const hostVersion = manifest.full.host_version.join('.');
version = version ?? (mod === 'host' ? manifest.full.host_version[2] : manifest.modules['discord_' + mod]?.full?.module_version);
Expand All @@ -41,7 +41,7 @@ export default async (channel, mod, version) => {
const domain = `https://dl${channel === 'stable' ? '' : `-${channel}`}.discordapp.net`;

// const downloadUrl = (mod === 'host' ? manifest : manifest.modules['discord_' + mod]).full.url;
const downloadUrl = mod === 'host' ? `${domain}/distro/app/${channel}/win/x86/1.0.${version}/full.distro` : `${domain}/distro/app/${channel}/win/x86/${hostVersion}/discord_${mod}/${version}/full.distro`;
const downloadUrl = mod === 'host' ? `${domain}/distro/app/${channel}/win/x64/1.0.${version}/full.distro` : `${domain}/distro/app/${channel}/win/x64/${hostVersion}/discord_${mod}/${version}/full.distro`;
console.log('DOWNLOADING', mod, version, '|', downloadUrl);

const outDir = join(baseOutDir, hostVersion, mod === 'host' ? 'host' : `modules`, mod === 'host' ? '' : mod);
Expand Down

0 comments on commit af073dd

Please sign in to comment.