mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-09-07 07:19:23 +00:00
add method to get what tracker fields are used
This commit is contained in:
@@ -111,4 +111,19 @@ export class Decoder {
|
|||||||
}
|
}
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getTrackerFields(): Set<string> {
|
||||||
|
const keys = new Set(
|
||||||
|
Object.values(this.trackers)
|
||||||
|
.map((tracker) => Object.keys(tracker))
|
||||||
|
.flat(1)
|
||||||
|
);
|
||||||
|
|
||||||
|
keys.delete('id');
|
||||||
|
keys.delete('has_subchunks');
|
||||||
|
keys.delete('data_len');
|
||||||
|
keys.delete('chunk_data');
|
||||||
|
|
||||||
|
return keys;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user