From dc99c872e05d8764f250fe20369f896f9db4802f Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 14 Feb 2026 19:41:09 +0000 Subject: [PATCH] fix thumbnail names in archives --- copyparty/sutil.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/copyparty/sutil.py b/copyparty/sutil.py index 9c91af68..454fc968 100644 --- a/copyparty/sutil.py +++ b/copyparty/sutil.py @@ -9,6 +9,7 @@ from .__init__ import CORES from .authsrv import VFS, AuthSrv from .bos import bos from .th_cli import ThumbCli +from .th_srv import TH_CH from .util import UTC, vjoin, vol_san if True: # pylint: disable=using-constant-test @@ -95,9 +96,7 @@ def enthumb( if not thp: raise Exception() - ext = ( - "jpg" if fmt == "j" else "webp" if fmt == "w" else "jxl" if fmt == "x" else fmt - ) + ext = fmt if fmt == "wav" else TH_CH.get(fmt[:1], fmt) sz = bos.path.getsize(thp) st: os.stat_result = f["st"] ts = st.st_mtime