From be2160158cf43a3a37f9d2c7a4194beeb38a55b4 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 27 May 2015 10:41:13 -0500 Subject: [PATCH] Fix add_genre_when_multi_category for AO3 changes to genre/category. --- fanficfare/story.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fanficfare/story.py b/fanficfare/story.py index f7abe435..bae5c15d 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -737,9 +737,6 @@ class Story(Configurable): if not value in self.metadata[listname]: self.metadata[listname].append(value) - if listname == 'category' and self.getConfig('add_genre_when_multi_category') and len(self.metadata[listname]) > 1: - self.addToList('genre',self.getConfig('add_genre_when_multi_category')) - def isList(self,listname): 'Everything set with an include_in_* is considered a list.' return self.isListType(listname) or \ @@ -781,6 +778,9 @@ class Story(Configurable): retlist = filter( lambda x : x!=None and x!='' ,retlist) + if listname == 'genre' and self.getConfig('add_genre_when_multi_category') and len(self.getList('category')) > 1: + retlist.append(self.getConfig('add_genre_when_multi_category')) + # reorder ships so b/a and c/b/a become a/b and a/b/c. Only on '/', # use replace_metadata to change separator first if needed. # ships=>[ ]*(/|&|&)[ ]*=>/