Author: duncan
Date: Mon Jan  1 22:28:37 2007
New Revision: 8900

Modified:
   branches/rel-1/freevo/src/helpers/cache.py
   branches/rel-1/freevo/src/util/fileops.py

Log:
Fixed some typos


Modified: branches/rel-1/freevo/src/helpers/cache.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/cache.py  (original)
+++ branches/rel-1/freevo/src/helpers/cache.py  Mon Jan  1 22:28:37 2007
@@ -77,7 +77,7 @@
             util.rmrf(f)
         else:
             os.unlink(f)
-    print 'deleted %s file%s' % (len(del_list), len(del_list) == 1 and '' or 
's')
+    print 'deleted %s file%s' % (len(del_list), len(del_list) != 1 and 's' or 
'')
 
 
 def delete_old_files_2():
@@ -94,7 +94,7 @@
         if not vfs.isfile(file[len(config.OVERLAY_DIR):-4]):
             os.unlink(file)
             num += 1
-    print 'deleted %s file%s' % (num, num == 1 and '' or 's')
+    print 'deleted %s file%s' % (num, num != 1 and 's' or '')
 
     print 'deleting cache for directories not existing anymore...',
     subdirs = util.get_subdirs_recursively(config.OVERLAY_DIR)
@@ -185,7 +185,7 @@
                 except:
                     pass
 
-    print '%s file%s' % (len(files), len(files) == 1 and '' or 's')
+    print '%s file%s' % (len(files), len(files) != 1 and 's' or '')
 
     for filename in files:
         fname = filename
@@ -239,7 +239,7 @@
                 except:
                     pass
 
-    print '%s file%s' % (len(files), len(files) == 1 and '' or 's')
+    print '%s file%s' % (len(files), len(files) != 1 and 's' or '')
 
     for filename in files:
         fname = filename

Modified: branches/rel-1/freevo/src/util/fileops.py
==============================================================================
--- branches/rel-1/freevo/src/util/fileops.py   (original)
+++ branches/rel-1/freevo/src/util/fileops.py   Mon Jan  1 22:28:37 2007
@@ -568,12 +568,9 @@
     '''
     threshold_size = config.WWW_IMAGE_THRESHOLD_SIZE
     thumbnail_size = config.WWW_IMAGE_THUMBNAIL_SIZE
-    cache_dir = www_image_cache()
     imagepath = filename.replace("/", "_").replace(".", "_") + ".jpg"
-    thumb_path = os.path.join(cache_dir, imagepath)
+    thumb_path = os.path.join(www_image_cachedir(), imagepath)
     image = imlib2.open(filename)
     thumb = image.scale_preserve_aspect(config.WWW_IMAGE_THUMBNAIL_SIZE)
     thumb.save(thumb_path)
-    if image.size[0] < threshold_image.size[0] and image.size[1] < 
threshold_image.size[1]:
-        return image.size
     return thumb.size

-------------------------------------------------------------------------
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

Reply via email to