mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-04 05:10:07 +00:00
fixed a bug in preview generator...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3c87738c14
commit
03003aa004
@ -244,8 +244,8 @@ if(window.CEF_dumpJSON != null){
|
|||||||
// wait for current image size if needed...
|
// wait for current image size if needed...
|
||||||
size_getter.done(function(source_size){
|
size_getter.done(function(source_size){
|
||||||
|
|
||||||
// skip previews larger than cur image...
|
// handle existing previews...
|
||||||
if(fs.existsSync(target_path +'/'+ name) || source_size <= size){
|
if(fs.existsSync(target_path +'/'+ name)){
|
||||||
// see if we know about the preview...
|
// see if we know about the preview...
|
||||||
if(img.preview == null || !((size+'px') in img.preview)){
|
if(img.preview == null || !((size+'px') in img.preview)){
|
||||||
var preview_path = [target_path, name].join('/')
|
var preview_path = [target_path, name].join('/')
|
||||||
@ -256,9 +256,15 @@ if(window.CEF_dumpJSON != null){
|
|||||||
IMAGES_UPDATED.push(gid)
|
IMAGES_UPDATED.push(gid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log('>>> Preview:', name, '('+size+'): Skipped.')
|
//console.log('>>> Preview:', name, '('+size+'): Exists.')
|
||||||
deferred.notify(gid, size, 'exists')
|
deferred.notify(gid, size, 'exists')
|
||||||
return deferred.resolve()
|
return deferred.resolve()
|
||||||
|
|
||||||
|
// skip previews larger than cur image...
|
||||||
|
} else if(source_size <= size){
|
||||||
|
//console.log('>>> Preview:', name, '('+size+'): Skipped.')
|
||||||
|
deferred.notify(gid, size, 'skipped')
|
||||||
|
return deferred.resolve()
|
||||||
}
|
}
|
||||||
|
|
||||||
// create the directory then go to its content...
|
// create the directory then go to its content...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user