From 33962fc0bf07ba68ed4dccc129eb716a0dd08170 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Dec 2019 23:38:36 +0000 Subject: [PATCH] Check start of media type --- epicyon.py | 2 -- media.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/epicyon.py b/epicyon.py index 15eb0c191..0fd2cd5d4 100644 --- a/epicyon.py +++ b/epicyon.py @@ -313,8 +313,6 @@ if args.tests: runAllTests() sys.exit() -args.blurhash=True - if args.testsnetwork: print('Network Tests') testPostMessageBetweenServers() diff --git a/media.py b/media.py index cdb25c443..efa08db49 100644 --- a/media.py +++ b/media.py @@ -118,7 +118,7 @@ def attachMedia(baseDir: str,httpPrefix: str,domain: str,port: int, \ 'type': 'Document', 'url': httpPrefix+'://'+domain+'/'+mediaPath } - if useBlurhash and mediaType=='image': + if useBlurhash and mediaType.startswith('image/'): attachmentJson['blurhash']=getImageHash(imageFilename) postJson['attachment']=[attachmentJson]