version 1.15, 2005/03/17 19:26:52
|
version 1.18, 2005/11/29 10:39:50
|
Line 9 from Products.PageTemplates.PageTemplate
|
Line 9 from Products.PageTemplates.PageTemplate
|
from Globals import InitializeClass,package_home |
from Globals import InitializeClass,package_home |
from OFS.SimpleItem import SimpleItem |
from OFS.SimpleItem import SimpleItem |
import zLOG |
import zLOG |
|
import sys |
|
|
def encodeRPC(string): |
def encodeRPC(string): |
return base64.encodestring(bz2.compress(string)) |
return base64.encodestring(bz2.compress(string)) |
Line 140 class OSAS_storeOnlineServer(SimpleItem)
|
Line 141 class OSAS_storeOnlineServer(SimpleItem)
|
compressed=encodeRPC(file(path+"/index.meta","r").read()) |
compressed=encodeRPC(file(path+"/index.meta","r").read()) |
ret["."]=('OSAS_dir',compressed) |
ret["."]=('OSAS_dir',compressed) |
for dir in os.listdir(path): |
for dir in os.listdir(path): |
|
zLOG.LOG("SERVER",zLOG.INFO,"get all index meta in %s"%dir) |
fileType=OSAS_helpers.checkOSASFileType(os.path.join(path,dir)) |
fileType=OSAS_helpers.checkOSASFileType(os.path.join(path,dir)) |
if os.path.exists(os.path.join(path,dir,"index.meta")): |
if os.path.exists(os.path.join(path,dir,"index.meta")): |
compressed=encodeRPC(file(os.path.join(path,dir,"index.meta"),"r").read()) |
compressed=encodeRPC(file(os.path.join(path,dir,"index.meta"),"r").read()) |
Line 156 class OSAS_storeOnlineServer(SimpleItem)
|
Line 158 class OSAS_storeOnlineServer(SimpleItem)
|
fh.close |
fh.close |
return True |
return True |
except: |
except: |
|
zLOG.LOG("SERVER (writeMetadataFile)",zLOG.ERROR,"%s (%s)"%sys.exc_info()[0:1]) |
return False |
return False |
|
|
def generateMovieThumb(self,input,output): |
def generateMovieThumb(self,input,output): |