Bandwidth tracking
This commit is contained in:
@@ -66,6 +66,12 @@ func MainApp(configPath string) {
|
||||
repo := http.NewIPRepository(repoClient4, repoClient6, "", log.Named("network_test"))
|
||||
repo.NetworkTest(false, config.ShouldCacheNetworkTestResults())
|
||||
|
||||
hosts := repo.GetHosts(config.GetNumberOfHosts(), config.ShouldForceIPv6())
|
||||
if len(hosts) == 0 {
|
||||
zurglog.Fatal("No reachable hosts found. We cannot continue! (check if Real-Debrid is down or they have blocked your IP address)")
|
||||
}
|
||||
zurglog.Debugf("Reachable hosts (%d): %v", len(hosts), hosts)
|
||||
|
||||
apiClient := http.NewHTTPClient(
|
||||
config.GetToken(),
|
||||
config.GetRetriesUntilFailed(), // default retries = 2
|
||||
@@ -86,12 +92,6 @@ func MainApp(configPath string) {
|
||||
log.Named("unrestrict_client"),
|
||||
)
|
||||
|
||||
hosts := repo.GetHosts(config.GetNumberOfHosts(), config.ShouldForceIPv6())
|
||||
if len(hosts) == 0 {
|
||||
zurglog.Fatal("No reachable hosts found. We cannot continue! (check if Real-Debrid is down or they have blocked your IP address)")
|
||||
}
|
||||
zurglog.Debugf("Reachable hosts (%d): %v", len(hosts), hosts)
|
||||
|
||||
downloadClient := http.NewHTTPClient(
|
||||
"",
|
||||
config.GetRetriesUntilFailed(),
|
||||
|
||||
Reference in New Issue
Block a user