feat: 添加音质选择 优化灰色歌曲解析

This commit is contained in:
alger
2025-01-06 20:54:42 +08:00
parent fcc47dc0ff
commit 020aca7384
12 changed files with 78 additions and 54 deletions
+2 -8
View File
@@ -6,15 +6,10 @@ import type { SongResult } from '@/type/music';
import { applyTheme, getCurrentTheme, ThemeType } from '@/utils/theme';
import { isElectron } from '@/utils';
import { likeSong, getLikedList } from '@/api/music';
import setData from '@/../main/set.json'
// 默认设置
const defaultSettings = {
isProxy: false,
noAnimate: false,
animationSpeed: 1,
author: 'Alger',
authorUrl: 'https://github.com/algerkong'
};
const defaultSettings = setData;
function getLocalStorageItem<T>(key: string, defaultValue: T): T {
const item = localStorage.getItem(key);
@@ -139,7 +134,6 @@ const mutations = {
const actions = {
initializeSettings({ commit }: { commit: any }) {
if (isElectron) {
// const setData = (window as any).electron.ipcRenderer.getStoreValue('set');
const setData = window.electron.ipcRenderer.sendSync('get-store-value', 'set');
commit('setSetData', setData || defaultSettings);
} else {