Index: lib/subscriptionClasses.js |
=================================================================== |
--- a/lib/subscriptionClasses.js |
+++ b/lib/subscriptionClasses.js |
@@ -218,6 +218,8 @@ |
result._homepage = obj.homepage; |
if ("lastDownload" in obj) |
result._lastDownload = parseInt(obj.lastDownload) || 0; |
+ if ("downloadCount" in obj) |
+ result.downloadCount = parseInt(obj.downloadCount) || 0; |
Wladimir Palant
2014/11/11 17:28:16
Nit: while at it, could you change that into parse
Thomas Greiner
2014/11/11 17:53:18
No problem. Done.
|
} |
catch (e) |
{ |
@@ -560,6 +562,12 @@ |
* @type Boolean |
*/ |
upgradeRequired: false, |
+ |
+ /** |
+ * Number indicating how often the object was downloaded. |
+ * @type Number |
+ */ |
+ downloadCount: 0, |
/** |
* See Subscription.serialize() |
@@ -583,5 +591,7 @@ |
buffer.push("version=" + this.version); |
if (this.requiredVersion) |
buffer.push("requiredVersion=" + this.requiredVersion); |
+ if (this.downloadCount) |
+ buffer.push("downloadCount=" + this.downloadCount); |
} |
}; |