mirror of
https://github.com/mirror/jdownloader.git
synced 2024-11-23 03:59:51 +00:00
*General*
- MultiHostHost: added field maxDownloads along with setter/getter; we may never use this but having it is better than needing it - AccountInfo: log non working hosts and skip them in stable git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49864 ebf7c1c2-ba36-0410-9fe8-c592906822b4 Former-commit-id: eb1e06c07d8570b81ae77b1bfdddb5691a2157c0
This commit is contained in:
parent
3dbb7a17e9
commit
5965c89a87
@ -545,6 +545,16 @@ public class AccountInfo extends Property implements AccountTrafficView {
|
||||
}
|
||||
continue cleanListLoop;
|
||||
}
|
||||
final boolean hostIsWorkingAccordingToMultihost = mhost.getStatus() == MultihosterHostStatus.WORKING || mhost.getStatus() == MultihosterHostStatus.WORKING_UNSTABLE;
|
||||
final boolean forcePrintNonWorkingHosts = true;
|
||||
if (forcePrintNonWorkingHosts && !hostIsWorkingAccordingToMultihost) {
|
||||
logger.info("Non working host: " + mhost);
|
||||
}
|
||||
if (!DebugMode.TRUE_IN_IDE_ELSE_FALSE && !hostIsWorkingAccordingToMultihost) {
|
||||
// TODO: Remove this check
|
||||
logger.info("Skipping non working host in stable: " + mhost.getName());
|
||||
continue cleanListLoop;
|
||||
}
|
||||
final LazyHostPlugin finalplugin = best.get(0);
|
||||
final String pluginHost = finalplugin.getHost();
|
||||
if (!finalresults.contains(pluginHost)) {
|
||||
|
@ -36,6 +36,7 @@ public class MultiHostHost implements Storable {
|
||||
private long unavailableUntilTimestamp = -1;
|
||||
private short trafficCalculationFactorPercent = 100;
|
||||
private int maxChunks = 0;
|
||||
private int maxDownloads = -1;
|
||||
private Boolean resume = null;
|
||||
private String statusText = null;
|
||||
private MultihosterHostStatus status = null;
|
||||
@ -262,6 +263,14 @@ public class MultiHostHost implements Storable {
|
||||
this.unavailableUntilTimestamp = Time.systemIndependentCurrentJVMTimeMillis() + milliseconds;
|
||||
}
|
||||
|
||||
public int getMaxDownloads() {
|
||||
return maxDownloads;
|
||||
}
|
||||
|
||||
public void setMaxDownloads(int maxDownloads) {
|
||||
this.maxDownloads = maxDownloads;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final String title;
|
||||
@ -272,6 +281,6 @@ public class MultiHostHost implements Storable {
|
||||
} else {
|
||||
title = null;
|
||||
}
|
||||
return title + " | LinksAvailable: " + this.getLinksLeft() + "/" + this.getLinksMax() + " | Traffic: " + SizeFormatter.formatBytes(this.getTrafficLeft()) + "/" + SizeFormatter.formatBytes(this.getTrafficMax()) + " | Chunks: " + this.getMaxChunks() + " | Resume: " + this.isResume();
|
||||
return title + " | Status: " + this.getStatus() + " | LinksAvailable: " + this.getLinksLeft() + "/" + this.getLinksMax() + " | Traffic: " + SizeFormatter.formatBytes(this.getTrafficLeft()) + "/" + SizeFormatter.formatBytes(this.getTrafficMax()) + " | Chunks: " + this.getMaxChunks() + " | Resume: " + this.isResume();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user