From 30af377ecbd661cbefcc674ee09e1f5030310b52 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 21 Jul 2023 11:13:17 +0100 Subject: [PATCH] no preview for html pages --- pandora/mobile/views.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pandora/mobile/views.py b/pandora/mobile/views.py index 927c22eab..2a4514ce7 100644 --- a/pandora/mobile/views.py +++ b/pandora/mobile/views.py @@ -28,12 +28,13 @@ def index(request, fragment): link = request.build_absolute_uri(document.get_absolute_url()) # FIXME: get preview image or fragment parse from url public_id = ox.toAZ(document.id) - preview = '/documents/%s/512p.jpg' % public_id - if page: - preview = '/documents/%s/512p%s.jpg' % (public_id, page) - if crop: - preview = '/documents/%s/512p%s.jpg' % (public_id, ','.join(crop)) - context['preview'] = request.build_absolute_uri(preview) + if self.extension != 'html': + preview = '/documents/%s/512p.jpg' % public_id + if page: + preview = '/documents/%s/512p%s.jpg' % (public_id, page) + if crop: + preview = '/documents/%s/512p%s.jpg' % (public_id, ','.join(crop)) + context['preview'] = request.build_absolute_uri(preview) elif parts[0] == 'edits': type = 'edit'