Changeset 562:60f5a636bc57 in documentViewer for documentViewer.py


Ignore:
Timestamp:
Oct 2, 2012, 1:22:11 PM (12 years ago)
Author:
casties
Branch:
default
Message:

bugfixes for stability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r561 r562  
    559559            docUrl = getParentPath(url)
    560560            metaDom = self.metadataService.getDomFromPathOrUrl(docUrl)
     561            docinfo['imagePath'] = url.replace('/mpiwg/online/', '', 1)
    561562
    562563        elif mode=="filepath":
    563564            # url points to image file, index.meta optional
    564             docinfo['imagePath'] = url
    565565            docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + url
    566566            docinfo['numPages'] = 1
     
    636636            # number of images from digilib
    637637            if docinfo.get('imagePath', None):
    638                 docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + docinfo['imagePath']
    639                 docinfo = self.getDocinfoFromDigilib(docinfo, docinfo['imagePath'])
     638                imgpath = docinfo['imagePath'].replace('/mpiwg/online/', '', 1)
     639                docinfo['imageURL'] = self.digilibBaseUrl + "/servlet/Scaler?fn=" + imgpath
     640                docinfo = self.getDocinfoFromDigilib(docinfo, imgpath)
    640641            else:
    641642                # imagePath still missing? try "./pageimg"
     
    696697        docPath = getMDText(docinfo.get('documentPath', None))
    697698        if imageDir and docPath:
    698             #print "image: ", imageDir, " archivepath: ", archivePath
    699699            imageDir = os.path.join(docPath, imageDir)
    700700            imageDir = imageDir.replace('/mpiwg/online', '', 1)
Note: See TracChangeset for help on using the changeset viewer.