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) {
|
func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
buf.WriteString("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||||
buf.WriteString("<ol>")
|
buf.WriteString("<ol>")
|
||||||
directories := torMgr.DirectoryMap.Keys()
|
directories := torMgr.DirectoryMap.Keys()
|
||||||
directories = append(directories, config.DOWNLOADS)
|
directories = append(directories, config.DOWNLOADS)
|
||||||
@@ -38,6 +39,7 @@ func ServeGroupDirectory(directory string, torMgr *torrent.TorrentManager) ([]by
|
|||||||
}
|
}
|
||||||
|
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
buf.WriteString("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||||
buf.WriteString("<ol>")
|
buf.WriteString("<ol>")
|
||||||
torrentNames := torrents.Keys()
|
torrentNames := torrents.Keys()
|
||||||
sort.Strings(torrentNames)
|
sort.Strings(torrentNames)
|
||||||
@@ -68,6 +70,7 @@ func ServeTorrentFiles(directory, torrentName string, torMgr *torrent.TorrentMan
|
|||||||
}
|
}
|
||||||
|
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
buf.WriteString("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||||
buf.WriteString("<ol>")
|
buf.WriteString("<ol>")
|
||||||
filenames := tor.SelectedFiles.Keys()
|
filenames := tor.SelectedFiles.Keys()
|
||||||
sort.Strings(filenames)
|
sort.Strings(filenames)
|
||||||
@@ -96,6 +99,7 @@ func ServeTorrentFiles(directory, torrentName string, torMgr *torrent.TorrentMan
|
|||||||
|
|
||||||
func ServeDownloads(_ string, torMgr *torrent.TorrentManager) ([]byte, error) {
|
func ServeDownloads(_ string, torMgr *torrent.TorrentManager) ([]byte, error) {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
buf.WriteString("<style>body{background-color:black;color:white}a{color:white}</style>")
|
||||||
buf.WriteString("<ol>")
|
buf.WriteString("<ol>")
|
||||||
filenames := torMgr.DownloadMap.Keys()
|
filenames := torMgr.DownloadMap.Keys()
|
||||||
sort.Strings(filenames)
|
sort.Strings(filenames)
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ func (rd *RealDebrid) GetTorrents(onlyOne bool) ([]Torrent, int, error) {
|
|||||||
}
|
}
|
||||||
torrentPages[result.page-1] = result.torrents
|
torrentPages[result.page-1] = result.torrents
|
||||||
totalFetched += len(result.torrents)
|
totalFetched += len(result.torrents)
|
||||||
|
if i%4 == 0 || i == maxPages {
|
||||||
rd.log.Debugf("Got %d/%d torrents", totalFetched, result.total)
|
rd.log.Debugf("Got %d/%d torrents", totalFetched, result.total)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
allTorrents := firstPage.torrents
|
allTorrents := firstPage.torrents
|
||||||
for _, page := range torrentPages {
|
for _, page := range torrentPages {
|
||||||
allTorrents = append(allTorrents, page...)
|
allTorrents = append(allTorrents, page...)
|
||||||
|
|||||||
Reference in New Issue
Block a user