diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index 0c1da13..62fc393 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -206,11 +206,7 @@ func (c *Cache) getRemPieces() []*Piece { } for r, _ := range c.readers { - notLoadSize := int64(FileRangeNotDelete) - if c.pieceLength > notLoadSize { - notLoadSize = c.pieceLength - } - if r.offset-r.file.Offset() < notLoadSize { + if c.isIdInFileBE(ranges, r.getReaderPiece()) { continue } pc := r.getReaderPiece()