// o = none, 1=tracker warn,2=tracker error,2=other
if ( str != null && str.length() > 0 ){
value = new Long(3);
}else{
value = ZERO;
TRTrackerAnnouncer tracker_client = core_download.getTrackerClient();
if ( tracker_client != null ){
TRTrackerAnnouncerResponse x = tracker_client.getBestAnnouncer().getLastResponse();
if ( x != null ){
if ( x.getStatus() == TRTrackerAnnouncerResponse.ST_REPORTED_ERROR ){
value = new Long(2);
}
}
}else{
DownloadScrapeResult x = download.getLastScrapeResult();
if ( x != null ){
if ( x.getResponseType() == DownloadScrapeResult.RT_ERROR ){
String status = x.getStatus();
if ( status != null && status.length() > 0 ){
value = new Long(2);
}
}
}
}
}
}else if ( field.equals( "errorString" )){
String str = download.getErrorStateDetails();
if ( str != null && str.length() > 0 ){
value = str;
}else{
value = "";
TRTrackerAnnouncer tracker_client = core_download.getTrackerClient();
if ( tracker_client != null ){
TRTrackerAnnouncerResponse x = tracker_client.getBestAnnouncer().getLastResponse();
if ( x != null ){
if ( x.getStatus() == TRTrackerAnnouncerResponse.ST_REPORTED_ERROR ){
value = x.getStatusString();
}
}