mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 22:54:37 +02:00
* Lots of improvements (WIP) to file browsing
This commit is contained in:
parent
67e2ff987f
commit
806e6539f4
7 changed files with 412 additions and 98 deletions
|
@ -25,6 +25,7 @@ const FILE_WELL_KNOWN_META = {
|
|||
dl_count : (d) => parseInt(d) || 0,
|
||||
byte_size : (b) => parseInt(b) || 0,
|
||||
user_rating : (r) => Math.min(parseInt(r) || 0, 5),
|
||||
archive_type : null,
|
||||
};
|
||||
|
||||
module.exports = class FileEntry {
|
||||
|
@ -33,8 +34,13 @@ module.exports = class FileEntry {
|
|||
|
||||
this.fileId = options.fileId || 0;
|
||||
this.areaTag = options.areaTag || '';
|
||||
this.meta = {};
|
||||
this.hashTags = new Set();
|
||||
this.meta = options.meta || {
|
||||
// values we always want
|
||||
user_rating : 0,
|
||||
dl_count : 0,
|
||||
};
|
||||
|
||||
this.hashTags = options.hashTags || new Set();
|
||||
this.fileName = options.fileName;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue