Skip to content

Commit

Permalink
Fix off-by-one error in most_recent_chunk / add_chapter_url interacti…
Browse files Browse the repository at this point in the history
…on, closes #672
  • Loading branch information
Hazel Shanks authored and JimmXinu committed Mar 20, 2021
1 parent 824e33a commit fb7abb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fanficfare/adapters/adapter_fictionlive.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def pair(iterable):
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)))
Expand Down Expand Up @@ -438,7 +438,7 @@ def format_choice(self, chunk):
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"<h4><span>" + vote_title + " — <small>Voting " + closed
Expand Down

0 comments on commit fb7abb7

Please sign in to comment.