--- OSA_system2/OSAS_server.py 2005/03/04 14:53:40 1.12 +++ OSA_system2/OSAS_server.py 2005/03/07 19:33:42 1.13 @@ -19,13 +19,17 @@ class OSAS_storeOnlineServer(SimpleItem) meta_type="OSAS_server" - def getImages(path): + def getImages(self,path): """hack""" imageEnding=['.gif','.jpg','.jpeg','.png','.tiff','.tif'] + dirs=os.listdir(path) ret=[] + for dir in dirs: - if os.path.isdir(dir): + + if os.path.isdir(os.path.join(path,dir)): + for subdir in os.listdir(os.path.join(path,dir)): if os.path.splitext(subdir)[1].lower() in imageEnding: ret.append(os.path.join(dir,subdir)) @@ -35,18 +39,18 @@ class OSAS_storeOnlineServer(SimpleItem) return ret - def getMovies(path): + def getMovies(self,path): """hack""" movieEnding=['.dv','.mov','.mp4'] dirs=os.listdir(path) ret=[] for dir in dirs: - if os.path.isdir(dir): + if os.path.isdir(os.path.join(path,dir)): for subdir in os.listdir(os.path.join(path,dir)): if os.path.splitext(subdir)[1].lower() in movieEnding: ret.append(os.path.join(dir,subdir)) else: - if os.path.splitext(dir)[1] in imageEnding: + if os.path.splitext(dir)[1] in movieEnding: ret.append(os.path.join(dir)) return ret @@ -114,7 +118,6 @@ class OSAS_storeOnlineServer(SimpleItem) """getFile""" if not os.path.exists(path): - print "sorry" return None f=file(path,'r')