fix images with same name getting same thumbnail

This commit is contained in:
Phill Ridout 2015-01-13 21:28:55 +00:00
parent 5bfb5b5426
commit 37be7e2ef1

View File

@ -345,7 +345,8 @@ class ImageMediaItem(MediaManagerItem):
for imageFile in images:
log.debug('Loading image: %s', imageFile.filename)
filename = os.path.split(imageFile.filename)[1]
thumb = os.path.join(self.service_path, filename)
ext = os.path.splitext(imageFile.filename)[1].lower()
thumb = os.path.join(self.service_path, "%s%s" % (str(imageFile.id), ext))
if not os.path.exists(imageFile.filename):
icon = build_icon(':/general/general_delete.png')
else: