Add lstat and "directory" property onto the filmout.state object.
This commit is contained in:
parent
ad1ac51fc8
commit
53d147b9bc
|
@ -34,6 +34,7 @@ class FilmOut {
|
||||||
still: false,
|
still: false,
|
||||||
path: null,
|
path: null,
|
||||||
fileName: null,
|
fileName: null,
|
||||||
|
directory: false,
|
||||||
info: {},
|
info: {},
|
||||||
dir: true,
|
dir: true,
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -205,7 +206,7 @@ class FilmOut {
|
||||||
this.state.fileName = arg.fileName;
|
this.state.fileName = arg.fileName;
|
||||||
this.state.frames = frames;
|
this.state.frames = frames;
|
||||||
this.state.info = info;
|
this.state.info = info;
|
||||||
this.state.hash = this.hash(arg.path);
|
//this.state.hash = this.hash(arg.path);
|
||||||
if (info.seconds) {
|
if (info.seconds) {
|
||||||
this.state.seconds = info.seconds;
|
this.state.seconds = info.seconds;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { default as animated } from 'animated-gif-detector';
|
import { default as animated } from 'animated-gif-detector';
|
||||||
import { extname } from 'path';
|
import { extname } from 'path';
|
||||||
import { readFile } from 'fs-extra';
|
import { readFile, lstat } from 'fs-extra';
|
||||||
import { delay } from 'delay';
|
import { delay } from 'delay';
|
||||||
import { createHash } from 'crypto';
|
import { createHash } from 'crypto';
|
||||||
import Jimp from 'jimp';
|
import Jimp from 'jimp';
|
||||||
|
@ -23,6 +23,7 @@ class FilmOut {
|
||||||
still : false,
|
still : false,
|
||||||
path : null,
|
path : null,
|
||||||
fileName : null,
|
fileName : null,
|
||||||
|
directory : false,
|
||||||
info : {},
|
info : {},
|
||||||
dir : true,
|
dir : true,
|
||||||
enabled : false
|
enabled : false
|
||||||
|
@ -212,7 +213,7 @@ class FilmOut {
|
||||||
this.state.fileName = arg.fileName;
|
this.state.fileName = arg.fileName;
|
||||||
this.state.frames = frames;
|
this.state.frames = frames;
|
||||||
this.state.info = info;
|
this.state.info = info;
|
||||||
this.state.hash = this.hash(arg.path);
|
//this.state.hash = this.hash(arg.path);
|
||||||
|
|
||||||
if (info.seconds) {
|
if (info.seconds) {
|
||||||
this.state.seconds = info.seconds;
|
this.state.seconds = info.seconds;
|
||||||
|
|
Loading…
Reference in New Issue