File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- import { type NativeImage , TouchBar } from 'electron' ;
1+ import { nativeImage , type NativeImage , TouchBar } from 'electron' ;
22
33import { createPlugin } from '@/utils' ;
44import getSongControls from '@/providers/song-controls' ;
55import registerCallback from '@/providers/song-info' ;
66import { t } from '@/i18n' ;
77
8+ import youtubeMusicIcon from '@assets/youtube-music.png?asset&asarUnpack' ;
9+
810export default createPlugin ( {
911 name : ( ) => t ( 'plugins.touchbar.name' ) ,
1012 description : ( ) => t ( 'plugins.touchbar.description' ) ,
@@ -89,9 +91,9 @@ export default createPlugin({
8991 pausePlayButton . label = songInfo . isPaused ? '▶️' : '⏸' ;
9092
9193 // Get image source
92- songImage . icon = songInfo . image
93- ? songInfo . image . resize ( { height : 23 } )
94- : undefined ;
94+ songImage . icon = (
95+ songInfo . image ? songInfo . image : nativeImage . createFromPath ( youtubeMusicIcon )
96+ ) . resize ( { height : 23 } ) ;
9597
9698 window . setTouchBar ( touchBar ) ;
9799 } ) ;
You can’t perform that action at this time.
0 commit comments