Only copy the content-range header
This commit is contained in:
@@ -3,9 +3,9 @@ package torrent
|
|||||||
import "github.com/debridmediamanager/zurg/internal/config"
|
import "github.com/debridmediamanager/zurg/internal/config"
|
||||||
|
|
||||||
func (t *TorrentManager) loadDumpedTorrents() {
|
func (t *TorrentManager) loadDumpedTorrents() {
|
||||||
// TODO: Paywall
|
// TODO: Paywall?
|
||||||
count := 0
|
count := 0
|
||||||
t.getTorrentFiles("data").Each(func(filePath string) bool {
|
t.getTorrentFiles("dump").Each(func(filePath string) bool {
|
||||||
torrent := t.readTorrentFromFile(filePath)
|
torrent := t.readTorrentFromFile(filePath)
|
||||||
if torrent != nil {
|
if torrent != nil {
|
||||||
accessKey := t.GetKey(torrent)
|
accessKey := t.GetKey(torrent)
|
||||||
|
|||||||
@@ -177,11 +177,9 @@ func (dl *Downloader) streamFileToResponse(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the headers from the download response to the response
|
// Copy the content-range header from the download response to the response
|
||||||
for k, vv := range downloadResp.Header {
|
if cr := downloadResp.Header.Get("Content-Range"); cr != "" {
|
||||||
for _, v := range vv {
|
resp.Header().Set("Content-Range", cr)
|
||||||
resp.Header().Add(k, v)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buf := make([]byte, cfg.GetNetworkBufferSize())
|
buf := make([]byte, cfg.GetNetworkBufferSize())
|
||||||
|
|||||||
Reference in New Issue
Block a user