fix: missing icons taskbar-mediacontrol

This commit is contained in:
JellyBrick
2023-10-08 19:41:39 +09:00
parent 5812eb0147
commit fbf4b3b8b5
4 changed files with 35 additions and 32 deletions

View File

@ -1,16 +1,20 @@
import path from 'node:path';
import { BrowserWindow, nativeImage } from 'electron';
import { app, BrowserWindow, nativeImage } from 'electron';
import getSongControls from '../../providers/song-controls';
import registerCallback, { SongInfo } from '../../providers/song-info';
import { getMediaIconLocation } from '../utils';
import { getMediaIconLocation, saveMediaIcon } from '../utils';
export default (win: BrowserWindow) => {
let currentSongInfo: SongInfo;
const { playPause, next, previous } = getSongControls(win);
if (app.isPackaged) {
saveMediaIcon();
}
const setThumbar = (win: BrowserWindow, songInfo: SongInfo) => {
// Wait for song to start before setting thumbar
if (!songInfo?.title) {