diff --git a/server/torr/storage/torrstor/cache.go b/server/torr/storage/torrstor/cache.go index a7d8be5..4620798 100644 --- a/server/torr/storage/torrstor/cache.go +++ b/server/torr/storage/torrstor/cache.go @@ -155,7 +155,7 @@ func (c *Cache) GetState() *state.CacheState { } readersState := make([]*state.ReaderState, 0) - + if c.Readers() > 0 { c.muReaders.Lock() for r, _ := range c.readers { @@ -258,13 +258,13 @@ func (c *Cache) getRemPieces() []*Piece { if !c.pieces[i].Complete { if i == readerPos { c.torrent.Piece(i).SetPriority(torrent.PiecePriorityNow) - } else if i == readerPos + 1 { + } else if i == readerPos+1 { 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++ @@ -282,10 +282,10 @@ func (c *Cache) getRemPieces() []*Piece { } 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 } diff --git a/server/web/pages/template/html.go b/server/web/pages/template/html.go index 2b532d3..c24bf00 100644 --- a/server/web/pages/template/html.go +++ b/server/web/pages/template/html.go @@ -49,24 +49,24 @@ var Mstile150x150png []byte var Sitewebmanifest []byte -//go:embed pages/static/js/2.97916048.chunk.js -var Staticjs297916048chunkjs []byte +//go:embed pages/static/js/2.5a98d9f9.chunk.js +var Staticjs25a98d9f9chunkjs []byte -//go:embed pages/static/js/2.97916048.chunk.js.LICENSE.txt -var Staticjs297916048chunkjsLICENSEtxt []byte +//go:embed pages/static/js/2.5a98d9f9.chunk.js.LICENSE.txt +var Staticjs25a98d9f9chunkjsLICENSEtxt []byte -//go:embed pages/static/js/2.97916048.chunk.js.map -var Staticjs297916048chunkjsmap []byte +//go:embed pages/static/js/2.5a98d9f9.chunk.js.map +var Staticjs25a98d9f9chunkjsmap []byte -//go:embed pages/static/js/main.d8f84fc6.chunk.js -var Staticjsmaind8f84fc6chunkjs []byte +//go:embed pages/static/js/main.823c0d3a.chunk.js +var Staticjsmain823c0d3achunkjs []byte -//go:embed pages/static/js/main.d8f84fc6.chunk.js.map -var Staticjsmaind8f84fc6chunkjsmap []byte +//go:embed pages/static/js/main.823c0d3a.chunk.js.map +var Staticjsmain823c0d3achunkjsmap []byte //go:embed pages/static/js/runtime-main.8bda5920.js diff --git a/server/web/pages/template/pages/asset-manifest.json b/server/web/pages/template/pages/asset-manifest.json index 1c3ee9c..c52d1b1 100644 --- a/server/web/pages/template/pages/asset-manifest.json +++ b/server/web/pages/template/pages/asset-manifest.json @@ -1,17 +1,17 @@ { "files": { - "main.js": "/static/js/main.d8f84fc6.chunk.js", - "main.js.map": "/static/js/main.d8f84fc6.chunk.js.map", + "main.js": "/static/js/main.823c0d3a.chunk.js", + "main.js.map": "/static/js/main.823c0d3a.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.8bda5920.js", "runtime-main.js.map": "/static/js/runtime-main.8bda5920.js.map", - "static/js/2.97916048.chunk.js": "/static/js/2.97916048.chunk.js", - "static/js/2.97916048.chunk.js.map": "/static/js/2.97916048.chunk.js.map", + "static/js/2.5a98d9f9.chunk.js": "/static/js/2.5a98d9f9.chunk.js", + "static/js/2.5a98d9f9.chunk.js.map": "/static/js/2.5a98d9f9.chunk.js.map", "index.html": "/index.html", - "static/js/2.97916048.chunk.js.LICENSE.txt": "/static/js/2.97916048.chunk.js.LICENSE.txt" + "static/js/2.5a98d9f9.chunk.js.LICENSE.txt": "/static/js/2.5a98d9f9.chunk.js.LICENSE.txt" }, "entrypoints": [ "static/js/runtime-main.8bda5920.js", - "static/js/2.97916048.chunk.js", - "static/js/main.d8f84fc6.chunk.js" + "static/js/2.5a98d9f9.chunk.js", + "static/js/main.823c0d3a.chunk.js" ] } \ No newline at end of file diff --git a/server/web/pages/template/pages/index.html b/server/web/pages/template/pages/index.html index 29724d9..3a30fed 100644 --- a/server/web/pages/template/pages/index.html +++ b/server/web/pages/template/pages/index.html @@ -1 +1 @@ -