This commit is contained in:
yourok
2019-09-20 13:18:06 +03:00
parent 93cd4f0452
commit 05af0bdc04

View File

@@ -15,7 +15,8 @@ import (
func (bt *BTServer) View(torr *Torrent, file *torrent.File, c echo.Context) error { func (bt *BTServer) View(torr *Torrent, file *torrent.File, c echo.Context) error {
go settings.SetViewed(torr.Hash().HexString(), file.Path()) go settings.SetViewed(torr.Hash().HexString(), file.Path())
reader := torr.NewReader(file, 0) reader := NewReader(file, bt.GetCache(torr.hash))
//reader := torr.NewReader(file, 0)
fmt.Println("Connect reader:", len(torr.readers)) fmt.Println("Connect reader:", len(torr.readers))
c.Response().Header().Set("Connection", "close") c.Response().Header().Set("Connection", "close")