Skip to content

Commit

Permalink
release 0.10.1: hotfix, icon-extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
JellyBrick committed Jul 27, 2023
1 parent e64f624 commit 843beea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 4 additions & 2 deletions src/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')}`;
Expand Down

0 comments on commit 843beea

Please sign in to comment.