Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove dead code from MediaFilePaths (#11056)
Browse files Browse the repository at this point in the history
  • Loading branch information
squahtx committed Oct 13, 2021
1 parent b3e9b00 commit b59f328
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
1 change: 1 addition & 0 deletions changelog.d/11056.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove dead code from `MediaFilePaths`.
17 changes: 0 additions & 17 deletions synapse/rest/media/v1/filepath.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:])

Expand Down

0 comments on commit b59f328

Please sign in to comment.