diff --git a/app/lib/ui/filmout.js b/app/lib/ui/filmout.js
index 649b92d..557bd52 100644
--- a/app/lib/ui/filmout.js
+++ b/app/lib/ui/filmout.js
@@ -46,9 +46,9 @@ let filmout;
class FilmOut {
constructor() {
this.id = 'filmout';
- this.extensions = ['.mpg', '.mpeg', '.mov', '.mkv', '.avi', '.mp4',
- '.gif',
- '.tif', '.tiff', '.png', '.jpg', '.jpeg', '.bmp'];
+ this.videoExtensions = ['.mpg', '.mpeg', '.mov', '.mkv', '.avi', '.mp4',
+ '.gif'];
+ this.imageExtensions = ['.tif', '.tiff', '.png', '.jpg', '.jpeg', '.bmp'];
this.displays = [];
this.state = {
frame: 0,
@@ -120,12 +120,16 @@ class FilmOut {
this.state.display = id;
ipcRenderer.send('display', { display: id });
}
+ /**
+ * Select a file from the showOpenDialog method. Save the file
+ * to an element if the selection is valid.
+ **/
selectFile() {
return __awaiter(this, void 0, void 0, function* () {
const elem = $('#digital');
const options = {
title: `Select video or image sequence`,
- properties: [`openFile`],
+ properties: [`multiSelection`],
defaultPath: 'c:/',
filters: [
{
@@ -148,24 +152,61 @@ class FilmOut {
}
if (!files)
return false;
- pathStr = files.filePaths[0];
- console.dir(pathStr);
- if (pathStr && pathStr !== '') {
- ext = path.extname(pathStr.toLowerCase());
- valid = this.extensions.indexOf(ext) === -1 ? false : true;
- log.info(pathStr);
- if (!valid) {
- return false;
- }
- log.info(`Selected video ${pathStr.split('/').pop()}`, 'FILMOUT', true);
+ if (files.filePaths.length > 0) {
+ pathStr = files.filePaths[0];
+ displayName = path.basename(pathStr);
+ valid = this.validateSelection(files);
+ log.info(`Selected "${displayName}"`, 'FILMOUT', true);
elem.attr('data-file', pathStr);
- displayName = pathStr.split('/').pop();
elem.val(displayName);
$('#filmout_file').val(displayName);
this.useFile();
}
+ if (!valid) {
+ gui.warn('Invalid selection', `The selection "${displayName}" is not an accepted video, image or folder containing an image sequence.`);
+ return false;
+ }
});
}
+ /**
+ * Validate the selection to be of an approved selection or a directory
+ * containing images of an approved extension.
+ **/
+ validateSelection(files) {
+ let ext;
+ let pathStr;
+ let dir = false;
+ let valid = false;
+ let fileList = [];
+ if (files.filePaths.length === 1) {
+ pathStr = files.filePaths[0];
+ dir = fs.lstatSync(pathStr).isDirectory();
+ if (dir) {
+ log.info('The selection is a directory');
+ fileList = fs.readdirSync(pathStr);
+ fileList = fileList.filter((file) => {
+ let ext = path.extname(file).toLowerCase();
+ if (this.imageExtensions.indexOf(ext)) {
+ return true;
+ }
+ return false;
+ });
+ if (fileList.length > 0) {
+ valid = true;
+ }
+ }
+ ext = path.extname(pathStr.toLowerCase());
+ valid = this.videoExtensions.indexOf(ext) === -1;
+ if (!valid) {
+ valid = this.imageExtensions.indexOf(ext) === -1;
+ }
+ return valid;
+ }
+ return false;
+ }
+ /**
+ * Prompt the user to use the selected file/files or cancel
+ **/
useFile() {
return __awaiter(this, void 0, void 0, function* () {
const elem = $('#digital');
diff --git a/app/lib/ui/filmout.js.map b/app/lib/ui/filmout.js.map
index 6bf584c..6d715ca 100644
--- a/app/lib/ui/filmout.js.map
+++ b/app/lib/ui/filmout.js.map
@@ -1 +1 @@
-{"version":3,"file":"filmout.js","sourceRoot":"","sources":["../../src/lib/ui/filmout.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;AAOb;;GAEG;AACH,SAAS,GAAG,CAAE,CAAU,EAAE,CAAU;IAChC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAE,SAAkB,EAAE,WAAoB;IAC7D,4DAA4D;IACzD,IAAI,IAAU,CAAC;IACf,IAAI,OAAa,CAAC;IAClB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAAE,OAAO,OAAO,CAAC;IACrE,IAAI,SAAS,KA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IAAI,EAAE;YACpB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAA;SAC5C;QACD,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAG,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,KAAK;QACJ,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAG,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAE,GAAS,EAAE,GAAS;IAE3B,CAAC;CACD;AAED,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAExB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC"}
\ No newline at end of file
diff --git a/app/src/lib/ui/filmout.ts b/app/src/lib/ui/filmout.ts
index dbfa3f8..caf485d 100644
--- a/app/src/lib/ui/filmout.ts
+++ b/app/src/lib/ui/filmout.ts
@@ -4,6 +4,7 @@
declare var dialog : any;
declare var path : any;
+declare var fs : any;
/**
* Determine the greatest common denominator
@@ -43,9 +44,9 @@ let filmout : FilmOut;
class FilmOut {
private id : string = 'filmout';
- private extensions : string[] = ['.mpg', '.mpeg', '.mov', '.mkv', '.avi', '.mp4',
- '.gif',
- '.tif', '.tiff', '.png', '.jpg', '.jpeg', '.bmp'];
+ private videoExtensions : string[] = ['.mpg', '.mpeg', '.mov', '.mkv', '.avi', '.mp4',
+ '.gif'];
+ private imageExtensions : string[] = ['.tif', '.tiff', '.png', '.jpg', '.jpeg', '.bmp'];
private displays : any[] = [];
private state : any = {
frame : 0,
@@ -124,11 +125,15 @@ class FilmOut {
this.state.display = id;
ipcRenderer.send('display', { display : id });
}
+ /**
+ * Select a file from the showOpenDialog method. Save the file
+ * to an element if the selection is valid.
+ **/
async selectFile () {
const elem : any = $('#digital');
const options : any = {
title : `Select video or image sequence`,
- properties : [`openFile`], // openDirectory, multiSelection, openFile
+ properties : [`multiSelection`], // openDirectory, multiSelection, openFile
defaultPath: 'c:/',
filters : [
{
@@ -144,34 +149,70 @@ class FilmOut {
let ext : string;
try {
- files = await dialog.showOpenDialog(options)
+ files = await dialog.showOpenDialog(options);
} catch (err) {
log.error(err);
- return false
+ return false;
}
-
if (!files) return false;
- pathStr = files.filePaths[0];
-
- console.dir(pathStr)
-
- if (pathStr && pathStr !== '') {
- ext = path.extname(pathStr.toLowerCase());
- valid = this.extensions.indexOf(ext) === -1 ? false : true;
- log.info(pathStr)
- if (!valid) {
- return false;
- }
- log.info(`Selected video ${pathStr.split('/').pop()}`, 'FILMOUT', true);
+ if (files.filePaths.length > 0) {
+ pathStr = files.filePaths[0];
+ displayName = path.basename(pathStr);
+ valid = this.validateSelection(files);
+ log.info(`Selected "${displayName}"`, 'FILMOUT', true);
elem.attr('data-file', pathStr);
- displayName = pathStr.split('/').pop();
elem.val(displayName);
$('#filmout_file').val(displayName);
-
this.useFile();
}
+
+ if (!valid) {
+ gui.warn('Invalid selection', `The selection "${displayName}" is not an accepted video, image or folder containing an image sequence.`);
+ return false;
+ }
}
+
+ /**
+ * Validate the selection to be of an approved selection or a directory
+ * containing images of an approved extension.
+ **/
+ validateSelection (files : any) {
+ let ext : string;
+ let pathStr : string;
+ let dir : boolean = false;
+ let valid : boolean = false;
+ let fileList : string[] = [];
+ if (files.filePaths.length === 1) {
+ pathStr = files.filePaths[0];
+ dir = fs.lstatSync(pathStr).isDirectory();
+ if (dir) {
+ log.info('The selection is a directory');
+ fileList = fs.readdirSync(pathStr);
+ fileList = fileList.filter((file : string) => {
+ let ext : string = path.extname(file).toLowerCase();
+ if (this.imageExtensions.indexOf(ext)) {
+ return true;
+ }
+ return false;
+ });
+ if (fileList.length > 0) {
+ valid = true;
+ }
+ }
+ ext = path.extname(pathStr.toLowerCase());
+ valid = this.videoExtensions.indexOf(ext) === -1;
+ if (!valid) {
+ valid = this.imageExtensions.indexOf(ext) === -1;
+ }
+ return valid;
+ }
+ return false;
+ }
+
+ /**
+ * Prompt the user to use the selected file/files or cancel
+ **/
async useFile () {
const elem : any = $('#digital');
const filePath : string = elem.attr('data-file');