mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
moving to new implementation of .checkIndex(..), still need testing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
98d87b612c
commit
8f7e18c945
@ -790,22 +790,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// // XXX prevent calling too often...
|
// // XXX prevent calling too often...
|
||||||
// // XXX
|
// // XXX
|
||||||
// that.checkIndex() }
|
// that.checkIndex() }
|
||||||
checkIndex: ['File/Check index consistency',
|
_checkIndex: ['File/Check index consistency',
|
||||||
core.doc`Check index consistency...
|
|
||||||
|
|
||||||
Check currently loaded index for missing references and fix them
|
|
||||||
if found.
|
|
||||||
|
|
||||||
This will:
|
|
||||||
- remove references to non-existing preview images (image.preview)
|
|
||||||
- remove references to non-existing .path (image.path)
|
|
||||||
- if .path removed, set to largest available preview
|
|
||||||
|
|
||||||
|
|
||||||
NOTE: currently this is disabled for merged indexes, need to load
|
|
||||||
and check individually...
|
|
||||||
|
|
||||||
`,
|
|
||||||
function(logger){
|
function(logger){
|
||||||
var that = this
|
var that = this
|
||||||
logger = logger || this.logger
|
logger = logger || this.logger
|
||||||
@ -863,7 +848,19 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
// need to save the check results...
|
// need to save the check results...
|
||||||
// XXX update .handlers to maintain .changes via promise...
|
// XXX update .handlers to maintain .changes via promise...
|
||||||
checkIndexPaths: ['- File/',
|
checkIndexPaths: ['- File/',
|
||||||
core.doc``,
|
core.doc`Check index image path consistency
|
||||||
|
|
||||||
|
Check currently loaded index for missing references and fix them
|
||||||
|
if found.
|
||||||
|
|
||||||
|
This will:
|
||||||
|
- remove references to non-existing preview images (image.preview)
|
||||||
|
- remove references to non-existing .path (image.path)
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: currently this is disabled for merged indexes, need to load
|
||||||
|
and check individually...
|
||||||
|
`,
|
||||||
core.sessionQueueHandler('checkIndex',
|
core.sessionQueueHandler('checkIndex',
|
||||||
function(queue, ...args){
|
function(queue, ...args){
|
||||||
// XXX ignore merged index...
|
// XXX ignore merged index...
|
||||||
@ -890,8 +887,7 @@ var FileSystemLoaderActions = actions.Actions({
|
|||||||
return updated ?
|
return updated ?
|
||||||
gid
|
gid
|
||||||
: [] })],
|
: [] })],
|
||||||
//checkIndex: ['File/Check index consistency',
|
checkIndex: ['File/Check index consistency',
|
||||||
_checkIndex: ['File/',
|
|
||||||
core.doc``,
|
core.doc``,
|
||||||
function(options={}){
|
function(options={}){
|
||||||
var context =
|
var context =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user