Author: duncan
Date: Mon Jan 1 15:09:28 2007
New Revision: 8893
Modified:
branches/rel-1/freevo/freevo_config.py
branches/rel-1/freevo/src/helpers/cache.py
branches/rel-1/freevo/src/helpers/webserver.py
branches/rel-1/freevo/src/util/fileops.py
branches/rel-1/freevo/src/www/htdocs/library.rpy
Log:
Changed WWW_CACHEDIR to WEBSERVER_CACHEDIR
Fixed a missed part for library patch
Modified: branches/rel-1/freevo/freevo_config.py
==============================================================================
--- branches/rel-1/freevo/freevo_config.py (original)
+++ branches/rel-1/freevo/freevo_config.py Mon Jan 1 15:09:28 2007
@@ -1755,7 +1755,7 @@
#
# Webserver cache directory
#
-WWW_CACHEDIR = FREEVO_CACHEDIR
+WEBSERVER_CACHEDIR = FREEVO_CACHEDIR
#
# Some sizes for the images in the web library
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 15:09:28 2007
@@ -206,7 +206,7 @@
import cStringIO
import stat
- print 'checking www thumbnails...............................',
+ print 'checking webserver thumbnails.........................',
sys.__stdout__.flush()
files = []
Modified: branches/rel-1/freevo/src/helpers/webserver.py
==============================================================================
--- branches/rel-1/freevo/src/helpers/webserver.py (original)
+++ branches/rel-1/freevo/src/helpers/webserver.py Mon Jan 1 15:09:28 2007
@@ -105,7 +105,7 @@
(title, path) = item
root.putChild(path.replace("/", "_"), static.File(path))
root.putChild(config.TV_RECORD_DIR.replace("/", "_"),
static.File(config.TV_RECORD_DIR))
- root.putChild(config.WWW_CACHEDIR.replace("/", "_"),
static.File(config.WWW_CACHEDIR))
+ root.putChild(config.WEBSERVER_CACHEDIR.replace("/", "_"),
static.File(config.WEBSERVER_CACHEDIR))
root.putChild('vhost', vhost.VHostMonsterResource())
rewriter = rewrite.RewriterResource(root, helpimagesrewrite)
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 15:09:28 2007
@@ -545,9 +545,9 @@
'''returns the www link cache directory name
if the directory does not exist it is created
'''
- cache_dir = '%s/link_cache/' % (config.WWW_CACHEDIR)
+ cache_dir = '%s/link_cache/' % (config.WEBSERVER_CACHEDIR)
if not os.path.isdir(cache_dir):
- os.mkdir(cache_dir,
stat.S_IMODE(os.stat(config.WWW_CACHEDIR)[stat.ST_MODE]))
+ os.mkdir(cache_dir,
stat.S_IMODE(os.stat(config.WEBSERVER_CACHEDIR)[stat.ST_MODE]))
return cache_dir
@@ -555,9 +555,9 @@
'''returns the www image cache directory name
if the directory does not exist it is created
'''
- cache_dir = '%s/image_cache/' % (config.WWW_CACHEDIR)
+ cache_dir = '%s/image_cache/' % (config.WEBSERVER_CACHEDIR)
if not os.path.isdir(cache_dir):
- os.mkdir(cache_dir,
stat.S_IMODE(os.stat(config.WWW_CACHEDIR)[stat.ST_MODE]))
+ os.mkdir(cache_dir,
stat.S_IMODE(os.stat(config.WEBSERVER_CACHEDIR)[stat.ST_MODE]))
return cache_dir
Modified: branches/rel-1/freevo/src/www/htdocs/library.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/library.rpy (original)
+++ branches/rel-1/freevo/src/www/htdocs/library.rpy Mon Jan 1 15:09:28 2007
@@ -78,9 +78,9 @@
'''
print 'convert_dir(self, dir_str=%r)' % (dir_str)
child_res = ""
- ### if the file starts with WWW_CACHEDIR return converted file
- if dir_str.startswith(config.WWW_CACHEDIR):
- child_res = config.WWW_CACHEDIR
+ ### if the file starts with WEBSERVER_CACHEDIR return converted file
+ if dir_str.startswith(config.WEBSERVER_CACHEDIR):
+ child_res = config.WEBSERVER_CACHEDIR
else:
for i in range(len(self.allowed_dirs)):
val = self.allowed_dirs[i][1]
@@ -627,7 +627,7 @@
size. May be in future the prefixed image size could be a config
variable.
'''
- print 'get_scaled_image(self, filepath=%r, size=%s)' % (filepath, size)
+ print 'get_scaled_image_and_size(self, filepath=%r, size=%s)' %
(filepath, str(size))
threshold_size = config.WWW_IMAGE_THRESHOLD_SIZE
new_size = config.WWW_IMAGE_THUMBNAIL_SIZE
new_size = self.get_fit_to_square_size(size, new_size)
@@ -651,8 +651,6 @@
image = imlib2.open(filepath)
new_image = image.scale(new_size)
new_image.save(scaled_image_path)
- else:
- scaled_image_path = filepath
scaled_image_path = self.convert_dir(scaled_image_path)
return (scaled_image_path, new_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