fix thumbnail names in archives

This commit is contained in:
ed 2026-02-14 19:41:09 +00:00
parent 40e13419e5
commit dc99c872e0

View file

@ -9,6 +9,7 @@ from .__init__ import CORES
from .authsrv import VFS, AuthSrv from .authsrv import VFS, AuthSrv
from .bos import bos from .bos import bos
from .th_cli import ThumbCli from .th_cli import ThumbCli
from .th_srv import TH_CH
from .util import UTC, vjoin, vol_san from .util import UTC, vjoin, vol_san
if True: # pylint: disable=using-constant-test if True: # pylint: disable=using-constant-test
@ -95,9 +96,7 @@ def enthumb(
if not thp: if not thp:
raise Exception() raise Exception()
ext = ( ext = fmt if fmt == "wav" else TH_CH.get(fmt[:1], fmt)
"jpg" if fmt == "j" else "webp" if fmt == "w" else "jxl" if fmt == "x" else fmt
)
sz = bos.path.getsize(thp) sz = bos.path.getsize(thp)
st: os.stat_result = f["st"] st: os.stat_result = f["st"]
ts = st.st_mtime ts = st.st_mtime