diff --git a/art/themes/luciano_blocktronics/theme.hjson b/art/themes/luciano_blocktronics/theme.hjson index d23904af..acc3c845 100644 --- a/art/themes/luciano_blocktronics/theme.hjson +++ b/art/themes/luciano_blocktronics/theme.hjson @@ -783,16 +783,13 @@ } fileBaseDownloadManager: { - config: { - queueListFormat: "|00|03{fileName:<61.60} {byteSize!sizeWithoutAbbr:>7.6} |11{byteSize!sizeAbbr}" - focusQueueListFormat: "|00|19|15{fileName:<61.60} {byteSize!sizeWithoutAbbr:>7.6} {byteSize!sizeAbbr}" - } - 0: { mci: { VM1: { height: 11 width: 69 + itemFormat: "|00|03{fileName:<61.60} {byteSize!sizeWithoutAbbr:>7.6} |11{byteSize!sizeAbbr}" + focusItemFormat: "|00|19|15{fileName:<61.60} {byteSize!sizeWithoutAbbr:>7.6} {byteSize!sizeAbbr}" } HM2: { width: 50 diff --git a/core/file_base_download_manager.js b/core/file_base_download_manager.js index f590ebd3..50abd6da 100644 --- a/core/file_base_download_manager.js +++ b/core/file_base_download_manager.js @@ -150,11 +150,7 @@ exports.getModule = class FileBaseDownloadQueueManager extends MenuModule { return cb(Errors.DoesNotExist('Queue view does not exist')); } - const queueListFormat = this.menuConfig.config.queueListFormat || '{fileName} {byteSize}'; - const focusQueueListFormat = this.menuConfig.config.focusQueueListFormat || queueListFormat; - - queueView.setItems(this.dlQueue.items.map( queueItem => stringFormat(queueListFormat, queueItem) ) ); - queueView.setFocusItems(this.dlQueue.items.map( queueItem => stringFormat(focusQueueListFormat, queueItem) ) ); + queueView.setItems(this.dlQueue.items); queueView.on('index update', idx => { const fileEntry = this.dlQueue.items[idx]; diff --git a/docs/_includes/nav.md b/docs/_includes/nav.md index 4c2fc0f6..d0a4e7eb 100644 --- a/docs/_includes/nav.md +++ b/docs/_includes/nav.md @@ -74,6 +74,7 @@ - [File Transfer Protocol Select]({{ site.baseurl }}{% link modding/file-transfer-protocol-select.md %}) - [Onelinerz]({{ site.baseurl }}{% link modding/onelinerz.md %}) - [Show Art]({{ site.baseurl }}{% link modding/show-art.md %}) + - [Download Manager]({{ site.baseurl }}{% link modding/file_base_download_manager.md %}) - Administration - [oputil]({{ site.baseurl }}{% link admin/oputil.md %}) diff --git a/docs/modding/file-base-download-manager.md b/docs/modding/file-base-download-manager.md new file mode 100644 index 00000000..c454de8a --- /dev/null +++ b/docs/modding/file-base-download-manager.md @@ -0,0 +1,22 @@ +--- +layout: page +title: File Transfer Protocol Select +--- +## File Base Download Manager Module +The `file_base_download_manager` module provides a download queue manager for "legacy" (X/Y/Z-Modem, etc.) downloads. + +## Configuration +### Configuration Block +Available `config` block entries: +* `webDlExpireTimeFormat`: Sets the moment.js style format for web download expiration date/time. +* `fileTransferProtocolSelection`: Overrides the default `fileTransferProtocolSelection` target for a protocol selection menu. +* `emptyQueueMenu`: Overrides the default `fileBaseDownloadManagerEmptyQueue` target for menu to show when the users D/L queue is empty. + +### Theming +The following `itemFormat` object is provided to MCI 1 (ie: `%VM1`) and MCI 10+ custom fields: +* `fileId`: File ID. +* `areaTag`: Area tag. +* `fileName`: Entry filename. +* `path`: Full file path. +* `byteSize`: Size in bytes of file. +