summary refs log tree commit diff
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2021-10-13 13:41:24 +0100
committerGitHub <noreply@github.com>2021-10-13 13:41:24 +0100
commitb59f3281d5bd2c5e3b717a37a40023afc766370c (patch)
tree60f825590eb3c84b17386c59c85a10a69f665c04
parentMerge remote-tracking branch 'origin/release-v1.45' into develop (diff)
downloadsynapse-b59f3281d5bd2c5e3b717a37a40023afc766370c.tar.xz
Remove dead code from `MediaFilePaths` (#11056)
-rw-r--r--changelog.d/11056.misc1
-rw-r--r--synapse/rest/media/v1/filepath.py17
2 files changed, 1 insertions, 17 deletions
diff --git a/changelog.d/11056.misc b/changelog.d/11056.misc
new file mode 100644

index 0000000000..dd701ed177 --- /dev/null +++ b/changelog.d/11056.misc
@@ -0,0 +1 @@ +Remove dead code from `MediaFilePaths`. diff --git a/synapse/rest/media/v1/filepath.py b/synapse/rest/media/v1/filepath.py
index eb66b749a2..bec77088ee 100644 --- a/synapse/rest/media/v1/filepath.py +++ b/synapse/rest/media/v1/filepath.py
@@ -48,23 +48,6 @@ class MediaFilePaths: def __init__(self, primary_base_path: str): self.base_path = primary_base_path - def default_thumbnail_rel( - self, - default_top_level: str, - default_sub_type: str, - width: int, - height: int, - content_type: str, - method: str, - ) -> str: - top_level_type, sub_type = content_type.split("/") - file_name = "%i-%i-%s-%s-%s" % (width, height, top_level_type, sub_type, method) - return os.path.join( - "default_thumbnails", default_top_level, default_sub_type, file_name - ) - - default_thumbnail = _wrap_in_base_path(default_thumbnail_rel) - def local_media_filepath_rel(self, media_id: str) -> str: return os.path.join("local_content", media_id[0:2], media_id[2:4], media_id[4:])