Use night mode for http mount, reduce got torrents log
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||
buf.WriteString("<ol>")
|
||||
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("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||
buf.WriteString("<ol>")
|
||||
torrentNames := torrents.Keys()
|
||||
sort.Strings(torrentNames)
|
||||
@@ -68,6 +70,7 @@ func ServeTorrentFiles(directory, torrentName string, torMgr *torrent.TorrentMan
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||
buf.WriteString("<ol>")
|
||||
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("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||
buf.WriteString("<ol>")
|
||||
filenames := torMgr.DownloadMap.Keys()
|
||||
sort.Strings(filenames)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user