🐛 Fix solidpkg url for retailclient

This commit is contained in:
C-3PO 2018-07-08 21:38:18 +02:00
parent 25d8994593
commit c76d5035bd
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
2 changed files with 2 additions and 2 deletions

View file

@ -24,7 +24,7 @@ export default async function getSolidpkg(product: Product, from: number, to: nu
}
//Download .solidpkg file
const ssnFile = await getUrlContents({ host: 'cdn-patch.swtor.com', path: `/patch/${product}/${product}_${from}to${to}.solidpkg` });
const ssnFile = await getUrlContents({ host: 'cdn-patch.swtor.com', path: `/patch/${product.startsWith('retailclient_') ? `${product.substring(13)}/` : ''}${product}/${product}_${from}to${to}.solidpkg` });
//Parse .solidpkg file
const fileEntries = readSsnFile(ssnFile);

View file

@ -189,7 +189,7 @@ export default function verifyPatchmanifest(manifestFile: xmlJs.Element, product
}
break;
case 'MetafileUrl':
if (valueName !== `http://cdn-patch.swtor.com/patch/${product}/${product}_${fromNum}to${toNum}.solidpkg`) {
if (valueName !== `http://cdn-patch.swtor.com/patch/${product.startsWith('retailclient_') ? `${product.substring(13)}/` : ''}${product}/${product}_${fromNum}to${toNum}.solidpkg`) {
throw new Error(`Expected valid Value for Key "MetafileUrl" in patch ${fromNum}to${toNum} but it was "${valueName}".`);
}
break;