Set minimum number of index pages to load

main2
Bob Mottram 2019-10-20 15:11:56 +01:00
parent be91c3b79c
commit 9ae3f23383
1 changed files with 4 additions and 1 deletions

View File

@ -2037,7 +2037,10 @@ def createBoxBase(session,baseDir: str,boxname: str, \
postsCtr=0
maxPostCtr=None
if pageNumber:
maxPostCtr=(itemsPerPage+3)*pageNumber
minPageNumber=pageNumber
if minPageNumber<3:
minPageNumber=3
maxPostCtr=itemsPerPage*minPageNumber
with open(indexFilename, 'r') as indexFile:
for postFilename in indexFile:
postsInBox[postsCtr]=os.path.join(boxDir, postFilename.replace('\n',''))