Author: duncan
Date: Thu Jan 11 21:20:37 2007
New Revision: 8964
Modified:
branches/rel-1/freevo/ChangeLog
branches/rel-1/freevo/src/util/fileops.py
branches/rel-1/freevo/src/util/vfs.py
branches/rel-1/freevo/src/www/htdocs/library.rpy
branches/rel-1/freevo/src/www/web_types.py
Log:
webserver image changes
fixing the images when they are not cached
Also fixes the three extensions for gif files
Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog (original)
+++ branches/rel-1/freevo/ChangeLog Thu Jan 11 21:20:37 2007
@@ -58,6 +58,7 @@
== Release 1.6.3 (2007-??-??) ==
--------------------------------
+ * Fixed auto shutdown not calling the mount command (B#1632754)
* Fixed manual record when month is December (B#1621615)
* Fixed shopping cart for items with two or more subitems (B#1620425)
* Fixed video thumbnails not being shown with subitems (B#1620452)
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 Thu Jan 11 21:20:37 2007
@@ -566,7 +566,7 @@
file_ext_index = filename.rindex(".")
file_ext = filename[file_ext_index:].lower()
if file_ext == ".gif":
- file_ext += ".jpg"
+ file_ext = ".jpg"
# the filename extension needs to be lowercase for imlib2 but we need to
# keep the original filename for cache to be able to clean the files
imagepath = filename + file_ext
@@ -591,12 +591,4 @@
except IOError, e:
print e
return (0, 0)
- return thumb.size
-
-
-def get_www_thumbnail_size(filename):
- '''returns the size from a webserver cached image.
- '''
- thumb_path = www_thumbnail_path(filename)
- image = imlib2.open(filename)
return image.size
Modified: branches/rel-1/freevo/src/util/vfs.py
==============================================================================
--- branches/rel-1/freevo/src/util/vfs.py (original)
+++ branches/rel-1/freevo/src/util/vfs.py Thu Jan 11 21:20:37 2007
@@ -38,7 +38,7 @@
import copy
import traceback
import codecs
-from stat import ST_MTIME
+from stat import *
import config
@@ -47,8 +47,9 @@
if the directory does not exist it is created
'''
cache_dir = '%s/link_cache' % (config.WEBSERVER_CACHEDIR)
+ cache_dir_mode = S_IMODE(os.stat(config.WEBSERVER_CACHEDIR)[ST_MODE])
if not os.path.isdir(cache_dir):
- os.mkdir(cache_dir,
stat.S_IMODE(os.stat(config.WEBSERVER_CACHEDIR)[stat.ST_MODE]))
+ os.mkdirs(cache_dir, cache_dir_mode)
return cache_dir
@@ -57,8 +58,9 @@
if the directory does not exist it is created
'''
cache_dir = '%s/image_cache' % (config.WEBSERVER_CACHEDIR)
+ cache_dir_mode = S_IMODE(os.stat(config.WEBSERVER_CACHEDIR)[ST_MODE])
if not os.path.isdir(cache_dir):
- os.mkdir(cache_dir,
stat.S_IMODE(os.stat(config.WEBSERVER_CACHEDIR)[stat.ST_MODE]))
+ os.mkdirs(cache_dir, cache_dir_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 Thu Jan 11 21:20:37 2007
@@ -483,7 +483,8 @@
if not os.path.exists(scaled_image_path):
size = util.create_www_thumbnail(item)
else:
- size = util.get_www_thumbnail_size(item)
+ size = imlib2.open(item).size
+ print 'DJW:size:',size, 'w:', info['width'],
'h:',info['height']
image_link = self.convert_dir(filepath)
scaled_image_link = self.convert_dir(scaled_image_path)
fv.tableCell('<div class="image"><a
href="javascript:openfoto(\''+image_link+'\','+str(size[0])+','+str(size[1])+')">'\
Modified: branches/rel-1/freevo/src/www/web_types.py
==============================================================================
--- branches/rel-1/freevo/src/www/web_types.py (original)
+++ branches/rel-1/freevo/src/www/web_types.py Thu Jan 11 21:20:37 2007
@@ -563,6 +563,7 @@
}
var
params="toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,top=0,left=0";
remoteWin = window.open("webremote.rpy","WebRemote",params);
+ remoteWin.focus();
}
-->
</script>
-------------------------------------------------------------------------
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