mirror of https://gitlab.com/bashrc2/epicyon
More debug
parent
bdeb21b5c5
commit
5d68176495
|
@ -1200,9 +1200,12 @@ def sharesTimelineJson(actor: str,pageNumber: int,itemsPerPage: int, \
|
||||||
sharesJson=loadJson(sharesFilename)
|
sharesJson=loadJson(sharesFilename)
|
||||||
if not sharesJson:
|
if not sharesJson:
|
||||||
continue
|
continue
|
||||||
owner=actor.split('/users/')[0]+'/users/'+handle.split('@')[0]
|
nickname=handle.split('@')[0]
|
||||||
|
# actor who owns this share
|
||||||
|
owner=actor.split('/users/')[0]+'/users/'+nickname
|
||||||
ctr=0
|
ctr=0
|
||||||
for itemID,item in sharesJson.items():
|
for itemID,item in sharesJson.items():
|
||||||
|
# assign owner to the item
|
||||||
item['actor']=owner
|
item['actor']=owner
|
||||||
allSharesJson[str(item['published'])]=item
|
allSharesJson[str(item['published'])]=item
|
||||||
ctr+=1
|
ctr+=1
|
||||||
|
@ -2634,11 +2637,14 @@ def htmlRemoveSharedItem(translate: {},baseDir: str,actor: str,shareName: str) -
|
||||||
domain,port=getDomainFromActor(actor)
|
domain,port=getDomainFromActor(actor)
|
||||||
sharesFile=baseDir+'/accounts/'+nickname+'@'+domain+'/shares.json'
|
sharesFile=baseDir+'/accounts/'+nickname+'@'+domain+'/shares.json'
|
||||||
if not os.path.isfile(sharesFile):
|
if not os.path.isfile(sharesFile):
|
||||||
|
print('ERROR: no shares file '+sharesFile
|
||||||
return None
|
return None
|
||||||
sharesJson=loadJson(sharesFile)
|
sharesJson=loadJson(sharesFile)
|
||||||
if not sharesJson:
|
if not sharesJson:
|
||||||
|
print('ERROR: unable to load shares.json')
|
||||||
return None
|
return None
|
||||||
if not sharesJson.get(shareName):
|
if not sharesJson.get(shareName):
|
||||||
|
print('ERROR: share named "'+shareName+'" is not in '+sharesFile)
|
||||||
return None
|
return None
|
||||||
sharedItemDisplayName=sharesJson[shareName]['displayName']
|
sharedItemDisplayName=sharesJson[shareName]['displayName']
|
||||||
sharedItemImageUrl=None
|
sharedItemImageUrl=None
|
||||||
|
|
Loading…
Reference in New Issue