mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
change readahead
This commit is contained in:
@@ -51,13 +51,16 @@ func GotInfo(t *torrent.Torrent, timeout int) error {
|
||||
}
|
||||
|
||||
func GetReadahead() int64 {
|
||||
readahead := int64(float64(settings.Get().CacheSize) * 0.33)
|
||||
readahead := settings.Get().CacheSize - (138412032) //132mb
|
||||
if readahead < 69206016 { //66mb
|
||||
readahead = int64(float64(settings.Get().CacheSize) * 0.33)
|
||||
if readahead < 66*1024*1024 {
|
||||
readahead = int64(settings.Get().CacheSize)
|
||||
if readahead > 66*1024*1024 {
|
||||
readahead = 66 * 1024 * 1024
|
||||
}
|
||||
}
|
||||
}
|
||||
return readahead
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user