Too many ors

main2
Bob Mottram 2019-09-14 19:40:47 +01:00
parent f20cd62c2d
commit 76c31b463e
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ def updateAvatarImageCache(session,baseDir: str,httpPrefix: str,actor: str,avata
sessionHeaders = {'Accept': 'image/png'} sessionHeaders = {'Accept': 'image/png'}
avatarImageFilename=baseDir+'/cache/avatars/'+actor.replace('/','-')+'.png' avatarImageFilename=baseDir+'/cache/avatars/'+actor.replace('/','-')+'.png'
elif avatarUrl.endswith('.jpg') or avatarUrl.endswith('.jpeg') or \ elif avatarUrl.endswith('.jpg') or avatarUrl.endswith('.jpeg') or \
or '.jpg?' in avatarUrl or '.jpeg?' in avatarUrl: '.jpg?' in avatarUrl or '.jpeg?' in avatarUrl:
sessionHeaders = {'Accept': 'image/jpeg'} sessionHeaders = {'Accept': 'image/jpeg'}
avatarImageFilename=baseDir+'/cache/avatars/'+actor.replace('/','-')+'.jpg' avatarImageFilename=baseDir+'/cache/avatars/'+actor.replace('/','-')+'.jpg'
elif avatarUrl.endswith('.gif') or '.gif?' in avatarUrl: elif avatarUrl.endswith('.gif') or '.gif?' in avatarUrl: