* WIP on upload support - protocols, modules, etc.
* Ability for KeyEntryView to only show specific/allowed keys * Start moving/adding common methods to MenuModule vs boilerplate code * menuFlags: String|StringArray: flags for menus, e.g. new 'noHistory' flag to prevent appending to history/stack * New download stats/MCI codes * Ability to redirect input stream to [protocols] temporairly
This commit is contained in:
@@ -12,6 +12,14 @@ module.exports = class DownloadQueue {
|
||||
}
|
||||
}
|
||||
|
||||
get items() {
|
||||
return this.client.user.downloadQueue;
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.client.user.downloadQueue = [];
|
||||
}
|
||||
|
||||
toggle(fileEntry) {
|
||||
if(this.isQueued(fileEntry)) {
|
||||
this.client.user.downloadQueue = this.client.user.downloadQueue.filter(e => fileEntry.fileId !== e.fileId);
|
||||
@@ -25,10 +33,19 @@ module.exports = class DownloadQueue {
|
||||
fileId : fileEntry.fileId,
|
||||
areaTag : fileEntry.areaTag,
|
||||
fileName : fileEntry.fileName,
|
||||
byteSize : fileEntry.meta.byteSize || 0,
|
||||
path : fileEntry.filePath,
|
||||
byteSize : fileEntry.meta.byte_size || 0,
|
||||
});
|
||||
}
|
||||
|
||||
removeItems(fileIds) {
|
||||
if(!Array.isArray(fileIds)) {
|
||||
fileIds = [ fileIds ];
|
||||
}
|
||||
|
||||
this.client.user.downloadQueue = this.client.user.downloadQueue.filter(e => ( -1 === fileIds.indexOf(e.fileId) ) );
|
||||
}
|
||||
|
||||
isQueued(entryOrId) {
|
||||
if(entryOrId instanceof FileEntry) {
|
||||
entryOrId = entryOrId.fileId;
|
||||
|
||||
Reference in New Issue
Block a user