main
Bob Mottram 2021-07-28 16:05:21 +01:00
parent f8a619a97d
commit 3d4d390bd9
1 changed files with 4 additions and 0 deletions

View File

@ -115,13 +115,16 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
if not os.path.isfile(sharesFile):
print('ERROR: no shares file ' + sharesFile)
return None
print('Shared item ID 3: ' + itemID)
sharesJson = loadJson(sharesFile)
if not sharesJson:
print('ERROR: unable to load shares.json')
return None
print('Shared item ID 4: ' + itemID)
if not sharesJson.get(itemID):
print('ERROR: share named "' + itemID + '" is not in ' + sharesFile)
return None
print('Shared item ID 5: ' + itemID)
sharedItemDisplayName = sharesJson[itemID]['displayName']
sharedItemImageUrl = None
if sharesJson[itemID].get('imageUrl'):
@ -164,6 +167,7 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, baseDir: str,
sharesStr += ' </div>\n'
sharesStr += '</div>\n'
sharesStr += htmlFooter()
print('Shared item ID 6: ' + itemID)
return sharesStr