From 9baca0e61bbd92b40e79fd9d49549f15cd91329c Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 1 Apr 2025 14:44:25 +1100 Subject: config: lazy update arrays Only set arrays if they are different --- src/utils/thumbnailer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/thumbnailer.ts') diff --git a/src/utils/thumbnailer.ts b/src/utils/thumbnailer.ts index a922590..ffd1c67 100644 --- a/src/utils/thumbnailer.ts +++ b/src/utils/thumbnailer.ts @@ -13,7 +13,7 @@ export default class Thumbnailer { static readonly #running = new Set(); static getThumbPath(path: string) { - const dir = path.slice(1, path.lastIndexOf("/")).replaceAll("/", "-"); + const dir = path.slice(path.indexOf("/") + 1, path.lastIndexOf("/")).replaceAll("/", "-"); return `${this.thumbnailDir}/${dir}-${basename(path)}.jpg`; } -- cgit v1.2.3-freya