From 6d3aaf44968f29e436df36c92e5bfe972e770c0e Mon Sep 17 00:00:00 2001 From: Gary Burton Date: Sun, 13 Apr 2008 20:38:46 +0000 Subject: [PATCH] Do not show duplicate media in person gallery svn: r10560 --- src/plugins/NarrativeWeb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index ad4b25c8d..00bf23dd1 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -577,9 +577,12 @@ class BasePage: 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() if title == "": @@ -603,6 +606,7 @@ class BasePage: self.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')