🐛 Allow reliable-id to be 1
This commit is contained in:
parent
52157f544c
commit
42db8d36a6
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue