mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
started teaching buildcache to also write updated images (not done yet)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
462105d7d0
commit
029d87e7f9
@ -1,7 +1,7 @@
|
|||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
||||||
__version__ = '''0.0.01'''
|
__version__ = '''0.0.01'''
|
||||||
__sub_version__ = '''20131014181354'''
|
__sub_version__ = '''20131014182003'''
|
||||||
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
||||||
|
|
||||||
|
|
||||||
@ -600,14 +600,20 @@ def build_cache(path, config=CONFIG, gid_generator=hash_gid,
|
|||||||
|
|
||||||
# get the new images...
|
# get the new images...
|
||||||
new_images = set(images).difference(_images)
|
new_images = set(images).difference(_images)
|
||||||
|
##!!!
|
||||||
##!!! list all updated images...
|
updated_images = []
|
||||||
|
|
||||||
# if there is no difference in images then no data updates need to
|
# if there is no difference in images then no data updates need to
|
||||||
# be done...
|
# be done...
|
||||||
if len(new_images) > 0:
|
if len(new_images) > 0:
|
||||||
# add only new images...
|
# add only new images...
|
||||||
images = dict( (k, images[k]) for k in new_images )
|
new_images = dict( (k, images[k]) for k in new_images)
|
||||||
|
##!!! add updated images...
|
||||||
|
for k in updated_images:
|
||||||
|
img = new_images[k] = _images[k]
|
||||||
|
img['previews'].update(images[k]['previews'])
|
||||||
|
images = new_images
|
||||||
|
|
||||||
# update filenames if we are updating...
|
# update filenames if we are updating...
|
||||||
d = time.strftime('%Y%m%d%H%M')
|
d = time.strftime('%Y%m%d%H%M')
|
||||||
if files[images_file] != {}:
|
if files[images_file] != {}:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user