From 843beea64e9bae0367092aed6de4d1183950e325 Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Thu, 27 Jul 2023 13:36:34 +0900 Subject: [PATCH] release 0.10.1: hotfix, icon-extractor --- package-lock.json | 4 ++-- package.json | 2 +- src/Application.ts | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 213b71bb..45cc5fca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "alspotron", - "version": "0.10.0", + "version": "0.10.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "alspotron", - "version": "0.10.0", + "version": "0.10.1", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 2218fcad..835aa15a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alspotron", - "version": "0.10.0", + "version": "0.10.1", "description": "Alspotron is a lyric viewer for YouTube Music / Spotify.", "main": "./dist/index.js", "scripts": { diff --git a/src/Application.ts b/src/Application.ts index f313e22b..6f11f906 100644 --- a/src/Application.ts +++ b/src/Application.ts @@ -420,10 +420,12 @@ class Application { event.returnValue = screen.getPrimaryDisplay(); }); ipcMain.handle('get-registered-process-list', () => this.registeredPidList); - ipcMain.handle('get-icon', async (_, path: string) => { + ipcMain.handle('get-icon', (_, path: string) => { if (process.platform === 'win32') { try { - const extractIcon = (await import('extract-file-icon')).default; + // HACK: dynamic import is not working + // eslint-disable-next-line @typescript-eslint/no-var-requires + const extractIcon = (require('extract-file-icon') as typeof import('extract-file-icon')); const result = extractIcon(path, 32); return `data:image/png;base64,${Buffer.from(result).toString('base64')}`;