From f7d25370855064610c84dabe1791cbacbe1f4360 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 30 Aug 2019 19:32:34 +0100 Subject: [PATCH] Rename function --- media.py | 4 ++-- posts.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/media.py b/media.py index ebdc20cfb..ff31f3a9d 100644 --- a/media.py +++ b/media.py @@ -68,11 +68,11 @@ def getAttachmentMediaType(filename: str) -> str: return 'audio' return mediaType -def attachImage(baseDir: str,httpPrefix: str,domain: str,port: int, \ +def attachMedia(baseDir: str,httpPrefix: str,domain: str,port: int, \ postJson: {},imageFilename: str, \ mediaType: str,description: str, \ useBlurhash: bool) -> {}: - """Attaches an image to a json object post + """Attaches media to a json object post The description can be None Blurhash is optional, since low power systems may take a long time to calculate it """ diff --git a/posts.py b/posts.py index be90b441a..47f3d073d 100644 --- a/posts.py +++ b/posts.py @@ -541,7 +541,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ } if attachImageFilename: newPost['object']= \ - attachImage(baseDir,httpPrefix,domain,port, \ + attachMedia(baseDir,httpPrefix,domain,port, \ newPost['object'],attachImageFilename, \ mediaType,imageDescription,useBlurhash) else: @@ -577,7 +577,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ } if attachImageFilename: newPost= \ - attachImage(baseDir,httpPrefix,domain,port, \ + attachMedia(baseDir,httpPrefix,domain,port, \ newPost,attachImageFilename, \ mediaType,imageDescription,useBlurhash) if ccUrl: