mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
fix: fix #30
This commit is contained in:
@ -7,7 +7,7 @@ import config from './config';
|
||||
|
||||
import { cache } from '../../providers/decorators';
|
||||
import { SongInfo } from '../../providers/song-info';
|
||||
import { getMediaIconLocation } from '../utils';
|
||||
import { getAssetsDirectoryLocation } from '../utils';
|
||||
|
||||
const icon = 'assets/youtube-music.png';
|
||||
const userData = app.getPath('userData');
|
||||
@ -89,7 +89,7 @@ export const saveTempIcon = () => {
|
||||
continue;
|
||||
}
|
||||
|
||||
const iconPath = path.resolve(getMediaIconLocation(), `${kind}.png`);
|
||||
const iconPath = path.resolve(path.resolve(getAssetsDirectoryLocation(), 'media-icons-black'), `${kind}.png`);
|
||||
fs.mkdirSync(path.dirname(destinationPath), { recursive: true });
|
||||
fs.copyFile(iconPath, destinationPath, () => {});
|
||||
}
|
||||
|
||||
@ -8,10 +8,12 @@ import is from 'electron-is';
|
||||
import { ValueOf } from '../utils/type-utils';
|
||||
import defaultConfig from '../config/defaults';
|
||||
|
||||
export const getAssetsDirectoryLocation = () => path.resolve(__dirname, 'assets');
|
||||
|
||||
export const getMediaIconLocation = () =>
|
||||
app.isPackaged
|
||||
? path.resolve(app.getPath('userData'), 'icons')
|
||||
: path.resolve(__dirname, 'assets', 'media-icons-black');
|
||||
: path.resolve(getAssetsDirectoryLocation(), 'media-icons-black');
|
||||
|
||||
// Creates a DOM element from an HTML string
|
||||
export const ElementFromHtml = (html: string): HTMLElement => {
|
||||
|
||||
Reference in New Issue
Block a user