mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
очередной фикс
This commit is contained in:
@@ -262,9 +262,9 @@ func (c *Cache) getRemPieces() []*Piece {
|
||||
c.torrent.Piece(i).SetPriority(torrent.PiecePriorityNext)
|
||||
} else if i > readerPos && i <= readerRAHPos {
|
||||
c.torrent.Piece(i).SetPriority(torrent.PiecePriorityReadahead)
|
||||
} else if i > readerRAHPos && i <= readerPos + (end - readerPos)/2 && c.torrent.PieceState(i).Priority != torrent.PiecePriorityHigh {
|
||||
} else if i > readerRAHPos && i <= readerRAHPos+5 && c.torrent.PieceState(i).Priority != torrent.PiecePriorityHigh {
|
||||
c.torrent.Piece(i).SetPriority(torrent.PiecePriorityHigh)
|
||||
} else if i > readerPos + (end - readerPos)/2 && c.torrent.PieceState(i).Priority != torrent.PiecePriorityNormal {
|
||||
} else if i > readerRAHPos+5 && c.torrent.PieceState(i).Priority != torrent.PiecePriorityNormal {
|
||||
c.torrent.Piece(i).SetPriority(torrent.PiecePriorityNormal)
|
||||
}
|
||||
limit++
|
||||
@@ -285,7 +285,7 @@ func (c *Cache) isIdInFileBE(ranges []Range, id int) bool {
|
||||
|
||||
// keep 8/16 MB
|
||||
FileRangeNotDelete := int64(c.pieceLength)
|
||||
if (FileRangeNotDelete < 8 * 1024 * 1024) {
|
||||
if FileRangeNotDelete < 8*1024*1024 {
|
||||
FileRangeNotDelete = 8 * 1024 * 1024
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user