diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-01 17:27:18 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-01 17:27:18 +1100 |
| commit | ff7324e7bfc1e01c8502e24a38e0729d87e63564 (patch) | |
| tree | 3af12a838f191dad413c6ff7096dd83d9ee8daa5 /src/utils/thumbnailer.ts | |
| parent | launcher: hide todo action if tod not installed (diff) | |
| download | caelestia-shell-ff7324e7bfc1e01c8502e24a38e0729d87e63564.tar.gz caelestia-shell-ff7324e7bfc1e01c8502e24a38e0729d87e63564.tar.bz2 caelestia-shell-ff7324e7bfc1e01c8502e24a38e0729d87e63564.zip | |
calendar: cache calendars
Diffstat (limited to 'src/utils/thumbnailer.ts')
| -rw-r--r-- | src/utils/thumbnailer.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/thumbnailer.ts b/src/utils/thumbnailer.ts index 7551870..caa3bbb 100644 --- a/src/utils/thumbnailer.ts +++ b/src/utils/thumbnailer.ts @@ -1,5 +1,5 @@ import { execAsync, Gio, GLib } from "astal"; -import { basename } from "./strings"; +import { pathToFileName } from "./strings"; export default class Thumbnailer { static readonly thumbnailDir = `${CACHE}/thumbnails`; @@ -13,8 +13,7 @@ export default class Thumbnailer { static readonly #running = new Set<string>(); static getThumbPath(path: string) { - const dir = path.slice(path.indexOf("/") + 1, path.lastIndexOf("/")).replaceAll("/", "-"); - return `${this.thumbnailDir}/${dir}-${basename(path)}.png`; + return `${this.thumbnailDir}/${pathToFileName(path, "png")}`; } static async shouldThumbnail(path: string) { |