From fb7abb7bee56e26001a1cb730813a74886e2566f Mon Sep 17 00:00:00 2001 From: Hazel Shanks Date: Sat, 20 Mar 2021 15:45:21 +1300 Subject: [PATCH] Fix off-by-one error in most_recent_chunk / add_chapter_url interaction, closes #672 --- fanficfare/adapters/adapter_fictionlive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fanficfare/adapters/adapter_fictionlive.py b/fanficfare/adapters/adapter_fictionlive.py index ec983780..d74b69d2 100644 --- a/fanficfare/adapters/adapter_fictionlive.py +++ b/fanficfare/adapters/adapter_fictionlive.py @@ -244,7 +244,7 @@ class FictionLiveAdapter(BaseSiteAdapter): titles = ["Home"] + titles times = [c['ct'] for c in maintext] - times = [data['ct']] + times + [self.most_recent_chunk + 1] + times = [data['ct']] + times + [self.most_recent_chunk + 2] # need to be 1 over, and add_url etc does -1 # doesn't actually run without the call to list. list(map(add_chapter_url, titles, pair(times))) @@ -438,7 +438,7 @@ class FictionLiveAdapter(BaseSiteAdapter): num_voters = len(chunk['votes']) if 'votes' in chunk else 0 vote_title = chunk['b'] if 'b' in chunk else "Choices" - + output = "" # start with the header output += u"

" + vote_title + " — Voting " + closed