Author: dmeyer
Date: Sun Jul 22 04:47:59 2007
New Revision: 2767

Log:
create thumbnails for non-files

Modified:
   trunk/WIP/beacon2/src/server/parser.py

Modified: trunk/WIP/beacon2/src/server/parser.py
==============================================================================
--- trunk/WIP/beacon2/src/server/parser.py      (original)
+++ trunk/WIP/beacon2/src/server/parser.py      Sun Jul 22 04:47:59 2007
@@ -96,7 +96,15 @@
     """
     mtime = item._beacon_mtime()
     if mtime == None:
-        log.warning('no mtime, skip %s' % item)
+        if item._beacon_data.get('scheme') in (None, 'file'):
+            log.warning('no mtime, skip %s' % item)
+            return 0
+        image = item._beacon_data.get('image')
+        if image and os.path.exists(image):
+            t = thumbnail.Thumbnail(image, item._beacon_media)
+            if not t.get(thumbnail.LARGE, check_mtime=True):
+                log.info('create missing image %s for %s', image, item)
+                t.create(thumbnail.LARGE, thumbnail.PRIORITY_LOW)
         return 0
 
     parent = item._beacon_parent

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to