diff --git a/src/plugins/touchbar/index.ts b/src/plugins/touchbar/index.ts index ac3e1f48..3f205d01 100644 --- a/src/plugins/touchbar/index.ts +++ b/src/plugins/touchbar/index.ts @@ -1,10 +1,12 @@ -import { type NativeImage, TouchBar } from 'electron'; +import { nativeImage, type NativeImage, TouchBar } from 'electron'; import { createPlugin } from '@/utils'; import getSongControls from '@/providers/song-controls'; import registerCallback from '@/providers/song-info'; import { t } from '@/i18n'; +import youtubeMusicIcon from '@assets/youtube-music.png?asset&asarUnpack'; + export default createPlugin({ name: () => t('plugins.touchbar.name'), description: () => t('plugins.touchbar.description'), @@ -89,9 +91,9 @@ export default createPlugin({ pausePlayButton.label = songInfo.isPaused ? '▶️' : '⏸'; // Get image source - songImage.icon = songInfo.image - ? songInfo.image.resize({ height: 23 }) - : undefined; + songImage.icon = ( + songInfo.image ? songInfo.image : nativeImage.createFromPath(youtubeMusicIcon) + ).resize({ height: 23 }); window.setTouchBar(touchBar); });