From 123781b58bd0b19353c94358c6f477ef0fcb3a97 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Wed, 18 Aug 2021 06:17:17 +0300 Subject: [PATCH] revert this one have proper loading --- server/torr/storage/torrstor/cache.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index 1fe8bac..574f40a 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -256,11 +256,7 @@ func (c *Cache) getRemPieces() []*Piece { for pc <= end && limit > 0 { if !c.pieces[pc].Complete { if c.torrent.PieceState(pc).Priority == torrent.PiecePriorityNone { - if limit == 1 { - c.torrent.Piece(pc).SetPriority(torrent.PiecePriorityNext) - } else if limit < 4 { - c.torrent.Piece(pc).SetPriority(torrent.PiecePriorityReadahead) - } else if limit < count/2 { + if limit > count/2 { c.torrent.Piece(pc).SetPriority(torrent.PiecePriorityHigh) } else { c.torrent.Piece(pc).SetPriority(torrent.PiecePriorityNormal)