diff --git a/src/interfaces/ISolidFile.ts b/src/interfaces/ISolidFile.ts index fe6fbe8..45a3a81 100644 --- a/src/interfaces/ISolidFile.ts +++ b/src/interfaces/ISolidFile.ts @@ -28,11 +28,11 @@ interface ISolid { /** Title of this torrent in the format `${product}: ${from}to${to}` */ title: string; /** Unknown integer, always 16097. */ - networkgroupid: number; + networkgroupid: 16097; /** The URL where the files from this torrent are stored, in the format `http://cdn-patch.swtor.com/patch/${product}/${product}_${from}to${to}/` */ reliable: string; - /** Always '0' */ - 'reliable-id': string; + /** Always '0' or '1' */ + 'reliable-id': '0' | '1'; /** Contains further information about this torrent, including the list of files. */ info: ISolidFileInfo; } diff --git a/src/ssn/verifySolidpkg.ts b/src/ssn/verifySolidpkg.ts index 3006beb..96f179f 100644 --- a/src/ssn/verifySolidpkg.ts +++ b/src/ssn/verifySolidpkg.ts @@ -17,8 +17,8 @@ export default function verifySolidpkg(file: ISolid, { product, from, to }: {pro if (file.reliable !== `http://cdn-patch.swtor.com/patch/${product}/${product}_${from}to${to}/`) { throw new Error(`Expected reliable URL but it was "${file.reliable}".`); } - if (file['reliable-id'] !== '0') { - throw new Error(`Expected reliable-id to be "0" but it was "${file['reliable-id']}".`); + if (file['reliable-id'] !== '0' && file['reliable-id'] !== '1') { + throw new Error(`Expected reliable-id to be "0" or "1" but it was "${file['reliable-id']}".`); } if (file.info === undefined) {