Add always_reload_first_chapter setting for base_xenforoforum stories with index chapter.

This commit is contained in:
Jim Miller 2016-08-11 12:12:34 -05:00
parent 1030cf44af
commit 65f286be99
2 changed files with 8 additions and 0 deletions

View file

@ -393,6 +393,13 @@ class BaseSiteAdapter(Configurable):
data = self.getChapterText(url)
# if had to fetch and has existing chapters
newchap = bool(self.oldchapters or self.oldchaptersmap)
if index == 0 and self.getConfig('always_reload_first_chapter'):
data = self.getChapterText(url)
# first chapter is rarely marked new
# anyway--only if it's replaced during an
# update.
newchap = False
self.story.addChapter(url,
removeEntities(title),

View file

@ -188,6 +188,7 @@ def get_valid_set_options():
'minimum_threadmarks':(base_xenforo_list,None,None),
'first_post_title':(base_xenforo_list,None,None),
'always_include_first_post':(base_xenforo_list,None,boollist),
'always_reload_first_chapter':(base_xenforo_list,None,boollist),
}
return dict(valdict)