bitfield@4
This commit is contained in:
21
package-lock.json
generated
21
package-lock.json
generated
@@ -1282,9 +1282,9 @@
|
||||
"integrity": "sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA=="
|
||||
},
|
||||
"bitfield": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bitfield/-/bitfield-3.0.0.tgz",
|
||||
"integrity": "sha512-hJmWKucJQfdSkQPDPBKmWogM9s8+NOSzDT9QVbJbjinXaQ0bJKPu/cn98qRWy3PDNWtKw4XaoUP3XruGRIKEgg=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bitfield/-/bitfield-4.0.0.tgz",
|
||||
"integrity": "sha512-jtuSG9CQr5yoHFuvhgf50+DH8Aezl3C/mMSfqdG4DqP7Kqe34uBUtCEHPN9oWaldTm96/i7y5e778SnM5ES4rw=="
|
||||
},
|
||||
"bittorrent-dht": {
|
||||
"version": "10.0.0",
|
||||
@@ -1331,6 +1331,11 @@
|
||||
"unordered-array-remove": "^1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"bitfield": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bitfield/-/bitfield-3.0.0.tgz",
|
||||
"integrity": "sha512-hJmWKucJQfdSkQPDPBKmWogM9s8+NOSzDT9QVbJbjinXaQ0bJKPu/cn98qRWy3PDNWtKw4XaoUP3XruGRIKEgg=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||
@@ -9557,6 +9562,11 @@
|
||||
"simple-sha1": "^3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bitfield": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bitfield/-/bitfield-3.0.0.tgz",
|
||||
"integrity": "sha512-hJmWKucJQfdSkQPDPBKmWogM9s8+NOSzDT9QVbJbjinXaQ0bJKPu/cn98qRWy3PDNWtKw4XaoUP3XruGRIKEgg=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||
@@ -9938,6 +9948,11 @@
|
||||
"utp-native": "^2.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"bitfield": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bitfield/-/bitfield-3.0.0.tgz",
|
||||
"integrity": "sha512-hJmWKucJQfdSkQPDPBKmWogM9s8+NOSzDT9QVbJbjinXaQ0bJKPu/cn98qRWy3PDNWtKw4XaoUP3XruGRIKEgg=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"application-config": "^2.0.0",
|
||||
"arch": "^2.2.0",
|
||||
"auto-launch": "^5.0.5",
|
||||
"bitfield": "^3.0.0",
|
||||
"bitfield": "^4.0.0",
|
||||
"capture-frame": "^4.0.0",
|
||||
"chokidar": "^3.4.3",
|
||||
"chromecasts": "^1.9.1",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const React = require('react')
|
||||
const Bitfield = require('bitfield')
|
||||
const BitField = require('bitfield').default
|
||||
const prettyBytes = require('prettier-bytes')
|
||||
|
||||
const TorrentSummary = require('../lib/torrent-summary')
|
||||
@@ -850,7 +850,7 @@ function renderLoadingBar (state) {
|
||||
const parts = []
|
||||
let lastPiecePresent = false
|
||||
for (let i = fileProg.startPiece; i <= fileProg.endPiece; i++) {
|
||||
const partPresent = Bitfield.prototype.get.call(prog.bitfield, i)
|
||||
const partPresent = BitField.prototype.get.call(prog.bitfield, i)
|
||||
if (partPresent && !lastPiecePresent) {
|
||||
parts.push({ start: i - fileProg.startPiece, count: 1 })
|
||||
} else if (partPresent) {
|
||||
|
||||
Reference in New Issue
Block a user