🐛 Fixed download URL for retailclient products

This commit is contained in:
C-3PO 2018-07-09 16:04:17 +02:00
parent d276d09634
commit a7e9a288f2
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -52,7 +52,11 @@ export default async function getPatch({ product, from, to, sourceDirectory, tar
const solidpkg = await getSolidpkg(product, from, to); const solidpkg = await getSolidpkg(product, from, to);
function createUrlObject({ name, length }: {name: string, length: number}) { function createUrlObject({ name, length }: {name: string, length: number}) {
return { host: 'cdn-patch.swtor.com', path: `/patch/${product}/${product}_${from}to${to}/${name}`, size: length }; return {
host: 'cdn-patch.swtor.com',
path: `/patch/${product.startsWith('retailclient_') ? `${product.substring(13)}/` : ''}${product}/${product}_${from}to${to}/${name}`,
size: length,
};
} }
//start download, making sure that .zip file downloads first //start download, making sure that .zip file downloads first