mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix freez preload
This commit is contained in:
@@ -277,9 +277,9 @@ func (t *Torrent) Preload(index int, size int64) {
|
||||
readerEnd.Seek(-1024, io.SeekEnd)
|
||||
readerEnd.Read(make([]byte, 1))
|
||||
defer t.cache.CloseReader(readerEnd)
|
||||
|
||||
pl := t.Info().PieceLength
|
||||
lastStat := ""
|
||||
for t.PreloadedBytes < size {
|
||||
for t.PreloadedBytes < size-pl {
|
||||
t.muTorrent.Lock()
|
||||
if t.Torrent == nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user