diff --git a/shares.py b/shares.py index d072fb6f..900c598e 100644 --- a/shares.py +++ b/shares.py @@ -31,8 +31,7 @@ def removeShare(baseDir: str,nickname: str,domain: str, \ itemID=displayName.replace(' ','') if sharesJson.get(itemID): # remove any image for the item - published=sharesJson[itemID]['published'] - itemIDfile=baseDir+'/sharefiles/'+str(published)+itemID + itemIDfile=baseDir+'/sharefiles/'+itemID if sharesJson[itemID]['imageUrl']: if sharesJson[itemID]['imageUrl'].endswith('.png'): os.remove(itemIDfile+'.png') @@ -101,25 +100,25 @@ def addShare(baseDir: str,nickname: str,domain: str, \ if os.path.isfile(imageFilename): if not os.path.isdir(baseDir+'/sharefiles'): os.mkdir(baseDir+'/sharefiles') - itemIDfile=baseDir+'/sharefiles/'+str(published)+itemID + itemIDfile=baseDir+'/sharefiles/'+itemID if imageFilename.endswith('.png'): if moveImage: os.rename(imageFilename,itemIDfile+'.png') else: copyfile(imageFilename,itemIDfile+'.png') - imageUrl='/sharefiles/'+str(published)+itemID+'.png' + imageUrl='/sharefiles/'+itemID+'.png' if imageFilename.endswith('.jpg'): if moveImage: os.rename(imageFilename,itemIDfile+'.jpg') else: copyfile(imageFilename,itemIDfile+'.jpg') - imageUrl='/sharefiles/'+str(published)+itemID+'.jpg' + imageUrl='/sharefiles/'+itemID+'.jpg' if imageFilename.endswith('.gif'): if moveImage: os.rename(imageFilename,itemIDfile+'.gif') else: copyfile(imageFilename,itemIDfile+'.gif') - imageUrl='/sharefiles/'+str(published)+itemID+'.gif' + imageUrl='/sharefiles/'+itemID+'.gif' sharesJson[itemID] = { "displayName": displayName, diff --git a/webinterface.py b/webinterface.py index c706f956..9f1ebff9 100644 --- a/webinterface.py +++ b/webinterface.py @@ -103,11 +103,17 @@ def htmlProfileShares(nickname: str,domain: str,sharesJson: {}) -> str: """ profileStr='' for item in sharesJson['orderedItems']: - profileStr+='
'+item['displayName']+'
' + profileStr+=''+item['summary']+'
' + profileStr+='Type: '+item['itemType']+' ' + profileStr+='Category: '+item['itemCategory']+' ' + profileStr+='Location: '+item['location']+'
' + profileStr+='@'+nickname+'@'+domain+' is not sharing any items
' else: - profileStr='