mirror of https://gitlab.com/bashrc2/epicyon
Better check for presence of orderedItems
parent
fdbdfaa9b5
commit
5a442c1d3c
6
posts.py
6
posts.py
|
@ -3374,8 +3374,6 @@ def _createBoxIndexed(recentPostsCache: {},
|
||||||
if postUrl in recentPostsCache['index']:
|
if postUrl in recentPostsCache['index']:
|
||||||
if recentPostsCache['json'].get(postUrl):
|
if recentPostsCache['json'].get(postUrl):
|
||||||
url = recentPostsCache['json'][postUrl]
|
url = recentPostsCache['json'][postUrl]
|
||||||
print('Adding post to timeline: ' +
|
|
||||||
boxname + ' ' + url)
|
|
||||||
if _addPostStringToTimeline(url,
|
if _addPostStringToTimeline(url,
|
||||||
boxname, postsInBox,
|
boxname, postsInBox,
|
||||||
boxActor):
|
boxActor):
|
||||||
|
@ -3395,8 +3393,6 @@ def _createBoxIndexed(recentPostsCache: {},
|
||||||
if os.path.isfile(fullPostFilename + '.reject'):
|
if os.path.isfile(fullPostFilename + '.reject'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
print('Adding post to timeline: ' +
|
|
||||||
boxname + ' ' + fullPostFilename)
|
|
||||||
if _addPostToTimeline(fullPostFilename, boxname,
|
if _addPostToTimeline(fullPostFilename, boxname,
|
||||||
postsInBox, boxActor):
|
postsInBox, boxActor):
|
||||||
postsAddedToTimeline += 1
|
postsAddedToTimeline += 1
|
||||||
|
@ -3413,8 +3409,6 @@ def _createBoxIndexed(recentPostsCache: {},
|
||||||
locatePost(baseDir, timelineNickname,
|
locatePost(baseDir, timelineNickname,
|
||||||
originalDomain, postUrl, False)
|
originalDomain, postUrl, False)
|
||||||
if fullPostFilename:
|
if fullPostFilename:
|
||||||
print('Adding post to timeline: ' +
|
|
||||||
boxname + ' ' + fullPostFilename)
|
|
||||||
if _addPostToTimeline(fullPostFilename, boxname,
|
if _addPostToTimeline(fullPostFilename, boxname,
|
||||||
postsInBox, boxActor):
|
postsInBox, boxActor):
|
||||||
postsAddedToTimeline += 1
|
postsAddedToTimeline += 1
|
||||||
|
|
|
@ -738,7 +738,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
# show the posts
|
# show the posts
|
||||||
itemCtr = 0
|
itemCtr = 0
|
||||||
if timelineJson:
|
if timelineJson:
|
||||||
if not timelineJson.get('orderedItems'):
|
if 'orderedItems' not in timelineJson:
|
||||||
print('ERROR: no orderedItems in timeline for '
|
print('ERROR: no orderedItems in timeline for '
|
||||||
+ boxName + ' ' + str(timelineJson))
|
+ boxName + ' ' + str(timelineJson))
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Reference in New Issue