|
From: <am...@vu...> - 2017-04-20 18:23:26
|
Revision: 44237
Author: amogge
Date: 2017-04-20 18:07:48 +0000 (Thu, 20 Apr 2017)
Log Message:
-----------
better activityDate
Modified Paths:
--------------
plugins/xmwebui/com/aelitis/azureus/plugins/xmwebui/XMWebUIPlugin.java
Modified: plugins/xmwebui/com/aelitis/azureus/plugins/xmwebui/XMWebUIPlugin.java
===================================================================
--- plugins/xmwebui/com/aelitis/azureus/plugins/xmwebui/XMWebUIPlugin.java 2017-04-19 23:11:38 UTC (rev 44236)
+++ plugins/xmwebui/com/aelitis/azureus/plugins/xmwebui/XMWebUIPlugin.java 2017-04-20 18:07:48 UTC (rev 44237)
@@ -6613,9 +6613,25 @@
if (relative) {
return -l;
}
- // XXX THIS IS STUPID! Time on this machine won't be the same as the client..
+
return (SystemTime.getCurrentTime() / 1000) - l;
}
+
+ DownloadManagerState downloadState = download.getDownloadState();
+ long timestamp = downloadState.getLongParameter(DownloadManagerState.PARAM_DOWNLOAD_LAST_ACTIVE_TIME);
+ if (timestamp != 0) {
+ return timestamp / 1000;
+ }
+
+ timestamp = downloadState.getLongParameter(DownloadManagerState.PARAM_DOWNLOAD_COMPLETED_TIME);
+ if (timestamp != 0) {
+ return timestamp / 1000;
+ }
+
+ timestamp = downloadState.getLongParameter(DownloadManagerState.PARAM_DOWNLOAD_ADDED_TIME);
+ if (timestamp != 0) {
+ return timestamp / 1000;
+ }
return 0;
}
|