Author: dmeyer
Date: Mon Apr 9 09:07:21 2007
New Revision: 2611
Modified:
trunk/beacon/src/server/parser.py
Log:
always prefer item.filename + [jpg|png] as image
Modified: trunk/beacon/src/server/parser.py
==============================================================================
--- trunk/beacon/src/server/parser.py (original)
+++ trunk/beacon/src/server/parser.py Mon Apr 9 09:07:21 2007
@@ -213,14 +213,6 @@
else:
base = os.path.splitext(item.filename)[0]
- for ext in ('.jpg', '.png'):
- if os.path.isfile(base + ext):
- attributes['image'] = base + ext
- break
- if os.path.isfile(item.filename + ext):
- attributes['image'] = item.filename + ext
- break
-
if type == 'video' and not attributes.get('image') and \
thumbnail.SUPPORT_VIDEO:
attributes['image'] = item.filename
@@ -236,6 +228,14 @@
except ValueError:
log.error('raw thumbnail')
+ for ext in ('.jpg', '.png'):
+ if os.path.isfile(base + ext):
+ attributes['image'] = base + ext
+ break
+ if os.path.isfile(item.filename + ext):
+ attributes['image'] = item.filename + ext
+ break
+
if attributes.get('image'):
t = thumbnail.Thumbnail(attributes.get('image'), item._beacon_media)
if not t.get(thumbnail.LARGE, check_mtime=True) and \
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog