From 70a9fb0929ec1b5dd9afd04d990d35206799c9b5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 24 Sep 2019 22:56:53 +0100 Subject: [PATCH] Fix the counting of posts --- posts.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/posts.py b/posts.py index e2f7cb0a..8fab4174 100644 --- a/posts.py +++ b/posts.py @@ -1857,11 +1857,11 @@ def createBoxBase(baseDir: str,boxname: str, \ isPost=False if isPost: + isTimelinePost=False if currPage == pageNumber and postsOnPageCtr <= itemsPerPage: # get the post as json p = json.loads(postStr) - isTimelinePost=False if (boxname!='dm' and boxname!='tlreplies'): isTimelinePost=True else: @@ -1903,10 +1903,11 @@ def createBoxBase(baseDir: str,boxname: str, \ if postsOnPageCtr >= itemsPerPage: break # count the pages - postsCtr += 1 - if postsCtr >= itemsPerPage: - postsCtr = 0 - currPage += 1 + if isTimelinePost: + postsCtr += 1 + if postsCtr >= itemsPerPage: + postsCtr = 0 + currPage += 1 except Exception as e: print(e) if headerOnly: