force regeneration of media asset scale variants when it seems to have changed
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3655 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
f9ac640529
commit
e2d01962c1
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2007 Helmut Merz helmutm@cy55.de
|
||||
# Copyright (c) 2009 Helmut Merz helmutm@cy55.de
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -73,7 +73,6 @@ class ExternalCollectionAdapter(AdapterBase):
|
|||
|
||||
def update(self):
|
||||
existing = self.context.getResources()
|
||||
#old = dict((adapted(obj).uniqueAddress, obj) for obj in existing)
|
||||
old = dict((adapted(obj).externalAddress, obj) for obj in existing)
|
||||
new = []
|
||||
oldFound = []
|
||||
|
@ -85,8 +84,11 @@ class ExternalCollectionAdapter(AdapterBase):
|
|||
# for checking for changes...
|
||||
oldFound.append(addr)
|
||||
if mdate and mdate > self.lastUpdated:
|
||||
obj = old[addr]
|
||||
# regenerate scale variant for media asset
|
||||
adapted(obj).externalAddress = addr
|
||||
# force reindexing
|
||||
notify(ObjectModifiedEvent(old[addr]))
|
||||
notify(ObjectModifiedEvent(obj))
|
||||
else:
|
||||
new.append(addr)
|
||||
if new:
|
||||
|
|
Loading…
Add table
Reference in a new issue