Fix verify download link logic, remove the setting

This commit is contained in:
Ben Sarmiento
2024-02-17 15:01:46 +01:00
parent b2067dfb81
commit b4b4ebbc49
5 changed files with 7 additions and 28 deletions

View File

@@ -62,7 +62,9 @@ func MainApp(configPath string) {
log.Named("unrestrict_client"),
)
api := realdebrid.NewRealDebrid(apiClient, unrestrictClient, log.Named("realdebrid"))
downloadClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), config.GetDownloadTimeoutSecs(), true, config, log.Named("download_client"))
api := realdebrid.NewRealDebrid(apiClient, unrestrictClient, downloadClient, log.Named("realdebrid"))
premium.MonitorPremiumStatus(api, zurglog)
@@ -76,7 +78,6 @@ func MainApp(configPath string) {
utils.EnsureDirExists("data") // Ensure the data directory exists
torrentMgr := torrent.NewTorrentManager(config, api, workerPool, log.Named("manager"))
downloadClient := http.NewHTTPClient(config.GetToken(), config.GetRetriesUntilFailed(), config.GetDownloadTimeoutSecs(), true, config, log.Named("download_client"))
downloader := universal.NewDownloader(downloadClient)
router := chi.NewRouter()