mirror of https://gitlab.com/bashrc2/epicyon
Set avatar image media types
parent
0a9fd492d3
commit
0c9d753c22
14
daemon.py
14
daemon.py
|
@ -3778,6 +3778,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
actorJson['icon']['url'] = \
|
actorJson['icon']['url'] = \
|
||||||
actorJson['icon']['url'].replace(srchStr,
|
actorJson['icon']['url'].replace(srchStr,
|
||||||
repStr)
|
repStr)
|
||||||
|
if '.' in actorJson['icon']['url']:
|
||||||
|
imgExt = \
|
||||||
|
actorJson['icon']['url'].split('.')[-1]
|
||||||
|
if imgExt == 'jpg':
|
||||||
|
imgExt = 'jpeg'
|
||||||
|
actorJson['icon']['mediaType'] = \
|
||||||
|
'image/' + imgExt
|
||||||
elif mType == 'image':
|
elif mType == 'image':
|
||||||
lastPartOfUrl = \
|
lastPartOfUrl = \
|
||||||
actorJson['image']['url'].split('/')[-1]
|
actorJson['image']['url'].split('/')[-1]
|
||||||
|
@ -3785,6 +3792,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
actorJson['image']['url'] = \
|
actorJson['image']['url'] = \
|
||||||
actorJson['image']['url'].replace(srchStr,
|
actorJson['image']['url'].replace(srchStr,
|
||||||
repStr)
|
repStr)
|
||||||
|
if '.' in actorJson['image']['url']:
|
||||||
|
imgExt = \
|
||||||
|
actorJson['image']['url'].split('.')[-1]
|
||||||
|
if imgExt == 'jpg':
|
||||||
|
imgExt = 'jpeg'
|
||||||
|
actorJson['image']['mediaType'] = \
|
||||||
|
'image/' + imgExt
|
||||||
|
|
||||||
# set skill levels
|
# set skill levels
|
||||||
skillCtr = 1
|
skillCtr = 1
|
||||||
|
|
Loading…
Reference in New Issue