[enhancement]: allow copying/opening path in song modal

This commit is contained in:
Kendall Garner 2024-04-06 16:13:09 -07:00
parent c1345802aa
commit 2c17458fdf
No known key found for this signature in database
GPG key ID: 18D2767419676C87
5 changed files with 94 additions and 1 deletions

View file

@ -342,6 +342,20 @@ const createWindow = async (first = true) => {
}
});
ipcMain.handle('open-item', async (_event, path: string) => {
return new Promise<void>((resolve, reject) => {
access(path, constants.F_OK, (error) => {
if (error) {
reject(error);
return;
}
shell.showItemInFolder(path);
resolve();
});
});
});
const globalMediaKeysEnabled = store.get('global_media_hotkeys', true) as boolean;
if (globalMediaKeysEnabled) {