changeset 79:df6952ac93e9 Root_integrate_imageArchive

bug in getDocInforFromImagePath, relative lage der index.meta zu path war falsch.
author dwinter
date Mon, 09 Mar 2009 09:37:19 +0100
parents 70ab234a18dc
children 8ec7b049a49c
files documentViewer.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/documentViewer.py	Fri Mar 06 16:36:38 2009 +0100
+++ b/documentViewer.py	Mon Mar 09 09:37:19 2009 +0100
@@ -384,7 +384,8 @@
             for x in range(cut):
                 path=getParentDir(path)
             dom = self.getIndexMeta(path)
-            
+        
+        logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path))
         # put in all raw bib fields as dict "bib"
         bib = dom.xpath("//bib/*")
         if bib and len(bib)>0:
@@ -539,14 +540,16 @@
         docinfo['imagePath'] = path
         docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo,cut=cut)
         
+        pathorig=path
         for x in range(cut):       
                 path=getParentDir(path)
         logging.error("PATH:"+path)
         imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path
         docinfo['imageURL'] = imageUrl
         
-        docinfo = self.getBibinfoFromIndexMeta(path,docinfo=docinfo,cut=cut)
-        docinfo = self.getAuthinfoFromIndexMeta(path,docinfo=docinfo,cut=cut)
+        #path ist the path to the images it assumes that the index.meta file is one level higher.
+        docinfo = self.getBibinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1)
+        docinfo = self.getAuthinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1)
         return docinfo