diff --git a/internal/universal/downloader.go b/internal/universal/downloader.go index 9740cc6..c8067fd 100644 --- a/internal/universal/downloader.go +++ b/internal/universal/downloader.go @@ -157,9 +157,9 @@ func (dl *Downloader) streamFileToResponse(torrent *intTor.Torrent, file *intTor } if torrent != nil { - log.Debugf("Downloading file %s from torrent %s (%s)%s", file.Path, torMgr.GetKey(torrent), unrestrict.Link, rangeLog) + log.Debugf("Opening file %s from torrent %s (%s)%s", file.Path, torMgr.GetKey(torrent), unrestrict.Link, rangeLog) } else { - log.Debugf("Downloading file %s (%s)%s", file.Path, unrestrict.Link, rangeLog) + log.Debugf("Opening file %s (%s)%s", file.Path, unrestrict.Link, rangeLog) } download, err := dl.client.Do(dlReq) @@ -201,6 +201,8 @@ func (dl *Downloader) streamFileToResponse(torrent *intTor.Torrent, file *intTor } } + log.Debugf("Started serving file %s", unrestrict.Filename) + buf := make([]byte, cfg.GetNetworkBufferSize()) io.CopyBuffer(resp, download.Body, buf) }