main
Bob Mottram 2019-11-18 15:04:08 +00:00
parent bddd03beec
commit 3b83a30e41
1 changed files with 5 additions and 6 deletions

View File

@ -2375,13 +2375,12 @@ def createBoxIndexed(session,baseDir: str,boxname: str, \
while postsCtr<maxPostCtr: while postsCtr<maxPostCtr:
postFilename=indexFile.readline() postFilename=indexFile.readline()
# Skip through any posts previous to the current page if not postFilename:
if postsCtr<int((pageNumber-1)*itemsPerPage): postsCtr+=1
if postFilename:
postsCtr+=1
continue continue
if not postFilename: # Skip through any posts previous to the current page
if postsCtr<int((pageNumber-1)*itemsPerPage):
postsCtr+=1 postsCtr+=1
continue continue
@ -2390,7 +2389,7 @@ def createBoxIndexed(session,baseDir: str,boxname: str, \
postFilename=postFilename.split('/')[-1] postFilename=postFilename.split('/')[-1]
# filename of the post without any extension or path # filename of the post without any extension or path
postUrl=postFilename.replace('\n','').replace('.json','') postUrl=postFilename.replace('\n','').replace('.json','').strip()
# get the full path of the post # get the full path of the post
fullPostFilename= \ fullPostFilename= \
locatePost(baseDir,nickname,domain,postUrl,False) locatePost(baseDir,nickname,domain,postUrl,False)