diff --git a/internal/http/listing.go b/internal/http/listing.go
index a2ab660..7c7f356 100644
--- a/internal/http/listing.go
+++ b/internal/http/listing.go
@@ -15,6 +15,7 @@ import (
func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) {
var buf bytes.Buffer
+ buf.WriteString("")
buf.WriteString("
")
directories := torMgr.DirectoryMap.Keys()
directories = append(directories, config.DOWNLOADS)
@@ -38,6 +39,7 @@ func ServeGroupDirectory(directory string, torMgr *torrent.TorrentManager) ([]by
}
var buf bytes.Buffer
+ buf.WriteString("")
buf.WriteString("")
torrentNames := torrents.Keys()
sort.Strings(torrentNames)
@@ -68,6 +70,7 @@ func ServeTorrentFiles(directory, torrentName string, torMgr *torrent.TorrentMan
}
var buf bytes.Buffer
+ buf.WriteString("")
buf.WriteString("")
filenames := tor.SelectedFiles.Keys()
sort.Strings(filenames)
@@ -96,6 +99,7 @@ func ServeTorrentFiles(directory, torrentName string, torMgr *torrent.TorrentMan
func ServeDownloads(_ string, torMgr *torrent.TorrentManager) ([]byte, error) {
var buf bytes.Buffer
+ buf.WriteString("")
buf.WriteString("")
filenames := torMgr.DownloadMap.Keys()
sort.Strings(filenames)
diff --git a/pkg/realdebrid/torrents.go b/pkg/realdebrid/torrents.go
index 55c156a..6c32325 100644
--- a/pkg/realdebrid/torrents.go
+++ b/pkg/realdebrid/torrents.go
@@ -65,7 +65,9 @@ func (rd *RealDebrid) GetTorrents(onlyOne bool) ([]Torrent, int, error) {
}
torrentPages[result.page-1] = result.torrents
totalFetched += len(result.torrents)
- rd.log.Debugf("Got %d/%d torrents", totalFetched, result.total)
+ if i%4 == 0 || i == maxPages {
+ rd.log.Debugf("Got %d/%d torrents", totalFetched, result.total)
+ }
}
allTorrents := firstPage.torrents
for _, page := range torrentPages {