mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
started working on an old bug....
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fe6bdf65e5
commit
dae13d71e0
@ -57,6 +57,7 @@ var CLIActions = actions.Actions({
|
||||
// ...move this to progress...
|
||||
// XXX we are missing some beats, is this because we do not let the
|
||||
// bar update before closing???
|
||||
// XXX need to reset this when done...
|
||||
__progress: null,
|
||||
showProgress: ['- System/',
|
||||
function(text, value, max){
|
||||
@ -429,6 +430,10 @@ var CLIActions = actions.Actions({
|
||||
// XXX how do we handle rejection???
|
||||
console.error('Can\'t find or load index at:', path) }) }],
|
||||
|
||||
// XXX
|
||||
cliCloneIndex: ['- System/CLI/clone index',
|
||||
function(){
|
||||
}],
|
||||
// XXX report that can't find an index...
|
||||
// XXX move options to generic object for re-use...
|
||||
// XXX how do we handle errors???
|
||||
|
||||
@ -3045,6 +3045,9 @@ function(title, func){
|
||||
// NOTE: this will prevent the items from getting
|
||||
// processed multiple times when the action
|
||||
// is called multiple times...
|
||||
// XXX this does not work -- we seem to
|
||||
// be getting different arrays on
|
||||
// each call...
|
||||
.splice(0, items.length)
|
||||
.map(function(e){
|
||||
return [e, ...args] })
|
||||
@ -3060,6 +3063,17 @@ function(title, func){
|
||||
|| inputs instanceof runner.FinalizableQueue) ?
|
||||
inputs.then(
|
||||
function(items){
|
||||
// XXX BUG: the problem here is that by the time
|
||||
// this is run the items can accumulate from
|
||||
// multiple calls but run is still called
|
||||
// once per original call...
|
||||
// ...the problem occurs when inputs is a
|
||||
// queue thus it will resolve to the whole
|
||||
// set of items and not the item we were
|
||||
// called with, we are compensating for
|
||||
// this ( .splice(..) ) above but it does
|
||||
// not work for some reason -- the array
|
||||
// seems not to be the same for each run...
|
||||
return run([items, ...args]) },
|
||||
function(){
|
||||
q && q.abort() })
|
||||
|
||||
@ -16,8 +16,7 @@ if(typeof(process) != 'undefined'){
|
||||
var glob = requirejs('glob')
|
||||
var wglob = requirejs('wildglob')
|
||||
|
||||
var file = require('imagegrid/file')
|
||||
}
|
||||
var file = require('imagegrid/file') }
|
||||
|
||||
var data = require('imagegrid/data')
|
||||
var images = require('imagegrid/images')
|
||||
|
||||
@ -270,7 +270,7 @@ var SharpActions = actions.Actions({
|
||||
images
|
||||
: [images],
|
||||
...args.slice(1),
|
||||
]},
|
||||
] },
|
||||
// prepare index independent data, this can be a tad slow...
|
||||
function(gid, _, path, options={}){
|
||||
// special case: we already got the paths...
|
||||
@ -731,8 +731,7 @@ var SharpActions = actions.Actions({
|
||||
return [gid, size, name] },
|
||||
function(err){
|
||||
logger
|
||||
&& logger.emit('skipped', `${gid} / ${size}`)
|
||||
}) })) })],
|
||||
&& logger.emit('skipped', `${gid} / ${size}`) }) })) })],
|
||||
|
||||
// XXX revise logging and logger passing...
|
||||
cacheMetadata: ['- Sharp|Image/',
|
||||
|
||||
@ -19,8 +19,7 @@ if(typeof(process) != 'undefined'){
|
||||
var guaranteeEvents = requirejs('guarantee-events')
|
||||
|
||||
} else {
|
||||
return module
|
||||
}
|
||||
return module }
|
||||
|
||||
var data = require('imagegrid/data')
|
||||
var images = require('imagegrid/images')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user