diff --git a/internal/http/listing.go b/internal/http/listing.go index dba4058..ec125ae 100644 --- a/internal/http/listing.go +++ b/internal/http/listing.go @@ -17,6 +17,9 @@ func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) { var buf bytes.Buffer buf.WriteString("
    ") directories := torMgr.DirectoryMap.Keys() + if torMgr.Config.GetConfig().UseDownloadCache { + directories = append(directories, config.DOWNLOADS) + } sort.Strings(directories) for _, directory := range directories { if strings.HasPrefix(directory, "int__") { @@ -25,9 +28,6 @@ func ServeRootDirectory(torMgr *torrent.TorrentManager) ([]byte, error) { directoryPath := url.PathEscape(directory) buf.WriteString(fmt.Sprintf("
  1. %s
  2. ", directoryPath, directory)) } - if torMgr.Config.GetConfig().UseDownloadCache { - buf.WriteString(fmt.Sprintf("
  3. %s
  4. ", config.DOWNLOADS, config.DOWNLOADS)) - } buf.WriteString(fmt.Sprintf("
  5. %s
  6. ", version.FILE, version.FILE)) return buf.Bytes(), nil diff --git a/internal/torrent/manager.go b/internal/torrent/manager.go index f164722..5ab338c 100644 --- a/internal/torrent/manager.go +++ b/internal/torrent/manager.go @@ -44,7 +44,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, p Api: api, allAccessKeys: mapset.NewSet[string](), latestState: &LibraryState{}, - requiredVersion: "07.01.2024", + requiredVersion: "10.01.2024", workerPool: p, log: log, } @@ -84,7 +84,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, p offset += len(downloads) page++ if offset >= totalDownloads { - t.log.Infof("Fetched %d downloads", t.DownloadCache.Count()) + t.log.Infof("Compiled into %d downloads", t.DownloadCache.Count()) break } }