diff --git a/TODO.md b/TODO.md index ea5e13f6..836486ca 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,7 @@ ## Before release +- Downloaded media filenames - "exception during sync" aren't caught - nio ClientTimeout - Name diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index fddd153d..895cf4b4 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -446,7 +446,8 @@ class MatrixClient(nio.AsyncClient): except OSError as err: log.warning(f"Failed thumbnailing {path}: {err}") else: - thumb_name = f"{path.stem}_thumbnail{''.join(path.suffixes)}" + thumb_ext = "png" if thumb_info.mime == "image/png" else "jpg" + thumb_name = f"{path.stem}_thumbnail.{thumb_ext}" upload_item.status = UploadStatus.Uploading upload_item.filepath = Path(thumb_name)