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...
|
// ...move this to progress...
|
||||||
// XXX we are missing some beats, is this because we do not let the
|
// XXX we are missing some beats, is this because we do not let the
|
||||||
// bar update before closing???
|
// bar update before closing???
|
||||||
|
// XXX need to reset this when done...
|
||||||
__progress: null,
|
__progress: null,
|
||||||
showProgress: ['- System/',
|
showProgress: ['- System/',
|
||||||
function(text, value, max){
|
function(text, value, max){
|
||||||
@ -429,6 +430,10 @@ var CLIActions = actions.Actions({
|
|||||||
// XXX how do we handle rejection???
|
// XXX how do we handle rejection???
|
||||||
console.error('Can\'t find or load index at:', path) }) }],
|
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 report that can't find an index...
|
||||||
// XXX move options to generic object for re-use...
|
// XXX move options to generic object for re-use...
|
||||||
// XXX how do we handle errors???
|
// XXX how do we handle errors???
|
||||||
|
|||||||
@ -3045,6 +3045,9 @@ function(title, func){
|
|||||||
// NOTE: this will prevent the items from getting
|
// NOTE: this will prevent the items from getting
|
||||||
// processed multiple times when the action
|
// processed multiple times when the action
|
||||||
// is called multiple times...
|
// is called multiple times...
|
||||||
|
// XXX this does not work -- we seem to
|
||||||
|
// be getting different arrays on
|
||||||
|
// each call...
|
||||||
.splice(0, items.length)
|
.splice(0, items.length)
|
||||||
.map(function(e){
|
.map(function(e){
|
||||||
return [e, ...args] })
|
return [e, ...args] })
|
||||||
@ -3060,6 +3063,17 @@ function(title, func){
|
|||||||
|| inputs instanceof runner.FinalizableQueue) ?
|
|| inputs instanceof runner.FinalizableQueue) ?
|
||||||
inputs.then(
|
inputs.then(
|
||||||
function(items){
|
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]) },
|
return run([items, ...args]) },
|
||||||
function(){
|
function(){
|
||||||
q && q.abort() })
|
q && q.abort() })
|
||||||
|
|||||||
@ -16,8 +16,7 @@ if(typeof(process) != 'undefined'){
|
|||||||
var glob = requirejs('glob')
|
var glob = requirejs('glob')
|
||||||
var wglob = requirejs('wildglob')
|
var wglob = requirejs('wildglob')
|
||||||
|
|
||||||
var file = require('imagegrid/file')
|
var file = require('imagegrid/file') }
|
||||||
}
|
|
||||||
|
|
||||||
var data = require('imagegrid/data')
|
var data = require('imagegrid/data')
|
||||||
var images = require('imagegrid/images')
|
var images = require('imagegrid/images')
|
||||||
|
|||||||
@ -270,7 +270,7 @@ var SharpActions = actions.Actions({
|
|||||||
images
|
images
|
||||||
: [images],
|
: [images],
|
||||||
...args.slice(1),
|
...args.slice(1),
|
||||||
]},
|
] },
|
||||||
// prepare index independent data, this can be a tad slow...
|
// prepare index independent data, this can be a tad slow...
|
||||||
function(gid, _, path, options={}){
|
function(gid, _, path, options={}){
|
||||||
// special case: we already got the paths...
|
// special case: we already got the paths...
|
||||||
@ -731,8 +731,7 @@ var SharpActions = actions.Actions({
|
|||||||
return [gid, size, name] },
|
return [gid, size, name] },
|
||||||
function(err){
|
function(err){
|
||||||
logger
|
logger
|
||||||
&& logger.emit('skipped', `${gid} / ${size}`)
|
&& logger.emit('skipped', `${gid} / ${size}`) }) })) })],
|
||||||
}) })) })],
|
|
||||||
|
|
||||||
// XXX revise logging and logger passing...
|
// XXX revise logging and logger passing...
|
||||||
cacheMetadata: ['- Sharp|Image/',
|
cacheMetadata: ['- Sharp|Image/',
|
||||||
|
|||||||
@ -19,8 +19,7 @@ if(typeof(process) != 'undefined'){
|
|||||||
var guaranteeEvents = requirejs('guarantee-events')
|
var guaranteeEvents = requirejs('guarantee-events')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return module
|
return module }
|
||||||
}
|
|
||||||
|
|
||||||
var data = require('imagegrid/data')
|
var data = require('imagegrid/data')
|
||||||
var images = require('imagegrid/images')
|
var images = require('imagegrid/images')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user