From 434ba30d51ba1f8b5a91b404c991bffeca7935fa Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 9 May 2026 00:15:36 +0200 Subject: [PATCH] clarification on chrome svg thumb re-enable --- copyparty/ico.py | 7 +++++-- copyparty/web/browser.js | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/copyparty/ico.py b/copyparty/ico.py index 5d79e9e4..cce4839f 100644 --- a/copyparty/ico.py +++ b/copyparty/ico.py @@ -15,7 +15,7 @@ class Ico(object): def __init__(self, args: argparse.Namespace) -> None: self.args = args - def get(self, ext: str, as_thumb: bool, chrome: bool, accent: str) -> tuple[str, bytes]: + def get(self, ext: str, as_thumb: bool, png: bool, accent: str) -> tuple[str, bytes]: """placeholder to make thumbnails not break""" bext = ext.encode("ascii", "replace") @@ -27,7 +27,10 @@ class Ico(object): sw, sh = self.args.th_size.split("x") h = int(100.0 / (float(sw) / float(sh))) - if chrome & 0: + # obsolete. 2000+ svgs slows chrome down massively, but no crash. + # further, unique svgs are only used for non-standard thumbnails, + # so it's unrealistic to see that many in use + if png & 0: # cannot handle more than ~2000 unique SVGs if HAVE_PILF: # pillow 10.1 made this the default font; diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 06513e8a..7661c1ff 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -6443,8 +6443,6 @@ var thegrid = (function () { if(ihref){ ihref = addq(ihref, 'cache=i&_=' + ACB + TS); - if (CHROME) - ihref += "&raster"; var accent = getComputedStyle(document.body).getPropertyValue('--a'); if (!accent)