diff --git a/src/interfaces/ISolidFile.ts b/src/interfaces/ISolidFile.ts index 5416d20..d364051 100644 --- a/src/interfaces/ISolidFile.ts +++ b/src/interfaces/ISolidFile.ts @@ -1,5 +1,7 @@ interface ISolidFile { - //TODO + //TODO: show length + /** File name of this file. */ + path: [string]; } interface ISolidFileInfo { diff --git a/src/ssn/bencodeParser.ts b/src/ssn/bencodeParser.ts index 0ea91cf..223377c 100644 --- a/src/ssn/bencodeParser.ts +++ b/src/ssn/bencodeParser.ts @@ -13,7 +13,7 @@ function bpParse(dv: DataView, posIn: number = 0): { obj: any, pos: number } { const header = dv.getUint8(pos); pos += 1; switch (header) { case 0x64: { //'d' - dictionary (key-value object) - obj = []; + obj = {}; do { //read key const out1 = bpParse(dv, pos);