2018-02-06 23:31:18 +01:00
|
|
|
class Metadata {
|
|
|
|
constructor(obj) {
|
|
|
|
this.dl = +obj.dl || 0;
|
|
|
|
this.dlimit = +obj.dlimit || 1;
|
|
|
|
this.pwd = String(obj.pwd) === 'true';
|
|
|
|
this.owner = obj.owner;
|
|
|
|
this.metadata = obj.metadata;
|
|
|
|
this.auth = obj.auth;
|
|
|
|
this.nonce = obj.nonce;
|
2020-07-13 19:21:28 +02:00
|
|
|
this.flagged = !!obj.flagged;
|
|
|
|
this.dead = !!obj.dead;
|
|
|
|
this.key = obj.key;
|
2018-02-06 23:31:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Metadata;
|