update web and fix merge

This commit is contained in:
nikk gitanes
2021-08-20 08:34:39 +03:00
parent b1f59bb3a1
commit 06b8a80d08
18 changed files with 142 additions and 203 deletions

View File

@@ -61,7 +61,7 @@ func (bt *BTServer) configure() {
userAgent := "qBittorrent/4.3.2"
peerID := "-qB4320-"
upnpID := "TorrServer"
// upnpID := "TorrServer"
cliVers := userAgent //"uTorrent/2210(25302)"
bt.config.Debug = settings.BTsets.EnableDebug
@@ -75,7 +75,7 @@ func (bt *BTServer) configure() {
bt.config.IPBlocklist = blocklist
bt.config.Bep20 = peerID
bt.config.PeerID = utils.PeerIDRandom(peerID)
bt.config.UpnpID = upnpID
// bt.config.UpnpID = upnpID
bt.config.HTTPUserAgent = userAgent
bt.config.ExtendedHandshakeClientVersion = cliVers
bt.config.EstablishedConnsPerTorrent = settings.BTsets.ConnectionsLimit

View File

@@ -73,10 +73,9 @@ func (p *Piece) Release() {
} else {
p.dPiece.Release()
}
// TODO: check this merge
if !p.cache.isClosed {
p.cache.torrent.Piece(p.Id).SetPriority(torrent.PiecePriorityNone)
// fix remove pieces hash
p.cache.torrent.Piece(p.Id).UpdateCompletion()
}
// if !p.cache.isClosed {
// p.cache.torrent.Piece(p.Id).SetPriority(torrent.PiecePriorityNone)
// // fix remove pieces hash
// p.cache.torrent.Piece(p.Id).UpdateCompletion()
// }
}