From 3d7729b1f74359da2856cc4b1188798d34d1e059 Mon Sep 17 00:00:00 2001 From: Andi_G Date: Sat, 20 Aug 2011 01:45:39 +0000 Subject: added support for pdfs without download url --- diff --git a/annoactivity.py b/annoactivity.py index e9ae1d6..d999881 100644 --- a/annoactivity.py +++ b/annoactivity.py @@ -539,7 +539,7 @@ class AnnoActivity(activity.Activity): prev_anno = annomanager.get_prev_annotation(page) if prev_anno is not None: _logger.debug('prev annotation page is %d' % prev_anno.page) - self._view.set_current_page(prev_anno.page + 1) + self._view.set_current_page(prev_anno.page) def __next_annotation_activate_cb(self, menuitem): @@ -550,7 +550,7 @@ class AnnoActivity(activity.Activity): if next_anno is not None: _logger.debug('next annotation page is %d' % next_anno.page) - self._view.set_current_page(next_anno.page + 1) + self._view.set_current_page(next_anno.page) def __bookmarker_toggled_cb(self, button): page = self._view.get_current_page() diff --git a/readdb.py b/readdb.py index 084abd8..2ddd8d4 100644 --- a/readdb.py +++ b/readdb.py @@ -623,7 +623,7 @@ class AnnotationManager: #if self._annotates == "": # self._annotates = "_" #values = {'w3c_hasTarget' : self._annotates} - values = {'w3c_hasTarget' : self._filehash} + values = {'checksum' : self._filehash} _logger.debug('download annotations -- annotates is: %s ' % self._annotates) try: data = urllib.urlencode(values) @@ -633,6 +633,7 @@ class AnnotationManager: except Exception, detail: _logger.debug("readdb: failure at initial sync request f. annotations; detail: %s ", detail) + _logger.debug('annojson is: %s', str(annojson)) if (annojson != None) and (len(annojson) > 0): anno_arr = self.parse_annotations(annojson) _logger.debug('length anno_arr %d', len(anno_arr)) -- cgit v0.9.1