From 0609e6423494896d69364ffc7d2069e8c0af101b Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Fri, 26 Jan 2024 13:30:51 +0100 Subject: [PATCH] Change log messages --- internal/universal/downloader.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) }