forked from indymedia/epicyon
Avoid checks for indexed posts
parent
ce3e372459
commit
c3b1e9ef08
5
posts.py
5
posts.py
|
@ -2026,6 +2026,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \
|
|||
postsInBox={}
|
||||
|
||||
indexFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/'+boxname+'.index'
|
||||
lookedUpFromIndex=False
|
||||
if os.path.isfile(indexFilename):
|
||||
print('DEBUG: using index file to construct timeline')
|
||||
postsCtr=0
|
||||
|
@ -2042,6 +2043,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \
|
|||
break
|
||||
postsInBox[postsCtr]=os.path.join(boxDir, postFilename.replace('\n',''))
|
||||
postsCtr+=1
|
||||
lookedUpFromIndex=True
|
||||
else:
|
||||
postsCtr=createBoxIndex(boxDir,postsInBoxDict)
|
||||
|
||||
|
@ -2112,6 +2114,9 @@ def createBoxBase(session,baseDir: str,boxname: str, \
|
|||
# get the post as json
|
||||
p = json.loads(postStr)
|
||||
|
||||
if lookedUpFromIndex:
|
||||
isTimelinePost=True
|
||||
else:
|
||||
if (boxname!='dm' and boxname!='tlreplies' and boxname!='tlmedia'):
|
||||
isTimelinePost=True
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue