* Default upload descriptions based on file names if no FILE_ID.DIZ/etc. could be found
* Add default desc & prompt for desc to oputil fb scan
This commit is contained in:
@@ -229,7 +229,7 @@ exports.getModule = class FileAreaList extends MenuModule {
|
||||
// We need the entry object to contain meta keys even if they are empty as
|
||||
// consumers may very likely attempt to use them
|
||||
//
|
||||
const metaValues = FileEntry.getWellKnownMetaValues();
|
||||
const metaValues = FileEntry.WellKnownMetaValues;
|
||||
metaValues.forEach(name => {
|
||||
const value = !_.isUndefined(currEntry.meta[name]) ? currEntry.meta[name] : 'N/A';
|
||||
entryInfo[_.camelCase(name)] = value;
|
||||
|
||||
@@ -8,6 +8,7 @@ const getSortedAvailableFileAreas = require('../core/file_base_area.js').getSor
|
||||
const getAreaDefaultStorageDirectory = require('../core/file_base_area.js').getAreaDefaultStorageDirectory;
|
||||
const scanFile = require('../core/file_base_area.js').scanFile;
|
||||
const getFileAreaByTag = require('../core/file_base_area.js').getFileAreaByTag;
|
||||
const getDescFromFileName = require('../core/file_base_area.js').getDescFromFileName;
|
||||
const ansiGoto = require('../core/ansi_term.js').goto;
|
||||
const moveFileWithCollisionHandling = require('../core/file_util.js').moveFileWithCollisionHandling;
|
||||
const pathWithTerminatingSeparator = require('../core/file_util.js').pathWithTerminatingSeparator;
|
||||
@@ -673,7 +674,7 @@ exports.getModule = class UploadModule extends MenuModule {
|
||||
|
||||
tagsView.setText( Array.from(fileEntry.hashTags).join(',') ); // :TODO: optional 'hashTagsSep' like file list/browse
|
||||
yearView.setText(fileEntry.meta.est_release_year || '');
|
||||
|
||||
|
||||
if(self.fileEntryHasDetectedDesc(fileEntry)) {
|
||||
descView.setPropertyValue('mode', 'preview');
|
||||
descView.setText(fileEntry.desc);
|
||||
@@ -681,7 +682,7 @@ exports.getModule = class UploadModule extends MenuModule {
|
||||
self.viewControllers.fileDetails.switchFocus(MciViewIds.fileDetails.tags);
|
||||
} else {
|
||||
descView.setPropertyValue('mode', 'edit');
|
||||
descView.setText('');
|
||||
descView.setText(getDescFromFileName(fileEntry.fileName)); // try to come up with something good as a default
|
||||
descView.acceptsFocus = true;
|
||||
self.viewControllers.fileDetails.switchFocus(MciViewIds.fileDetails.desc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user