From bb605d8781d416dd19b95beb466983e3c9029138 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 3 Mar 2018 21:40:28 -0700 Subject: [PATCH] * Add new well known meta for temp session d/ls * Better meta assign in ctor --- core/file_entry.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/file_entry.js b/core/file_entry.js index 467e0d3a..2ec03c17 100644 --- a/core/file_entry.js +++ b/core/file_entry.js @@ -38,6 +38,7 @@ const FILE_WELL_KNOWN_META = { tic_origin : null, // TIC "Origin" tic_desc : null, // TIC "Desc" tic_ldesc : null, // TIC "Ldesc" joined by '\n' + session_temp_dl : (v) => parseInt(v) ? true : false, }; module.exports = class FileEntry { @@ -46,11 +47,7 @@ module.exports = class FileEntry { this.fileId = options.fileId || 0; this.areaTag = options.areaTag || ''; - this.meta = options.meta || { - // values we always want - dl_count : 0, - }; - + this.meta = Object.assign( { dl_count : 0 }, options.meta); this.hashTags = options.hashTags || new Set(); this.fileName = options.fileName; this.storageTag = options.storageTag;