2018-06-22 17:10:38 +02:00
|
|
|
interface ISolidFile {
|
2018-06-22 17:35:36 +02:00
|
|
|
/** Length of this file in bytes, up to 1700000000 or 1.7 GB */
|
|
|
|
length: number;
|
|
|
|
/** File name of this file, e.g. `${product}_${from}to${to}.z01` or `${product}_${from}to${to}.zip`. */
|
2018-06-22 17:21:14 +02:00
|
|
|
path: [string];
|
2018-06-22 17:10:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface ISolidFileInfo {
|
|
|
|
/** List of files that are part of this torrent. */
|
|
|
|
files: ISolidFile[];
|
2018-06-23 22:21:12 +02:00
|
|
|
/** Length of one piece in bytes, e.g. 65536 for 64 KiB, and 4194304 for 4 MiB. */
|
|
|
|
'piece length': 65536 | 4194304;
|
2018-06-24 01:37:10 +02:00
|
|
|
/** Concatenated SHA1 hashes of all pieces, where each hash is 20 bytes long. */
|
2018-06-22 17:10:38 +02:00
|
|
|
pieces: string;
|
|
|
|
/** Whether the torrent is private, always 0. */
|
|
|
|
private: 0 | 1;
|
|
|
|
/** Whether the torrent is closed, always 1. */
|
|
|
|
closed: 0 | 1;
|
|
|
|
/** Unique ID of this torrent, e.g. '85ff8715-d1ce-4320-805c-bea80b6dd03c' */
|
|
|
|
uniqueid: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ISolid {
|
|
|
|
/** Timestamp when this torrent was created, given in seconds since 1970. Can be read with `new Date(... * 1000)`. */
|
|
|
|
'creation date': number;
|
|
|
|
/** Internal tracker URL used to announce this torrent. */
|
|
|
|
announce: string;
|
|
|
|
/** Title of this torrent in the format `${product}: ${from}to${to}` */
|
|
|
|
title: string;
|
|
|
|
/** Unknown integer, always 16097. */
|
2018-06-24 02:24:13 +02:00
|
|
|
networkgroupid: 16097;
|
2018-06-22 17:10:38 +02:00
|
|
|
/** 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;
|
2018-06-24 02:24:13 +02:00
|
|
|
/** Always '0' or '1' */
|
|
|
|
'reliable-id': '0' | '1';
|
2018-06-22 17:10:38 +02:00
|
|
|
/** Contains further information about this torrent, including the list of files. */
|
|
|
|
info: ISolidFileInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ISolid;
|