From d97f73f71b12d467b5920375fa3e3dd9ffbd8fb8 Mon Sep 17 00:00:00 2001 From: Gary Burton Date: Sun, 13 Apr 2008 20:40:12 +0000 Subject: [PATCH] Do not show duplicate media in person gallery svn: r10561 --- src/plugins/NarrativeWeb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index 440a62c29..940db0062 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -458,10 +458,13 @@ class BasePage: db = self.report.database of.write('\t
\n') of.write('\t\t

%s

\n' % _('Gallery')) + displayed = [] for mediaref in photolist: photo_handle = mediaref.get_reference_handle() photo = db.get_object_from_handle(photo_handle) + if photo_handle in displayed: + continue mime_type = photo.get_mime_type() title = photo.get_description() @@ -493,6 +496,7 @@ class BasePage: photo_list[photo_handle] = [lnk] except (IOError, OSError), msg: WarningDialog(_("Could not add photo to page"), str(msg)) + displayed.append(photo_handle) of.write('\t\t
\n') of.write('\t
\n\n')