YesPlayMusic/src/store/initLocalStorage.js
2024-09-30 13:35:22 +08:00

55 lines
1.3 KiB
JavaScript

import { playlistCategories } from '@/utils/staticData';
import shortcuts from '@/utils/shortcuts';
console.debug('[debug][initLocalStorage.js]');
const enabledPlaylistCategories = playlistCategories
.filter(c => c.enable)
.map(c => c.name);
let localStorage = {
player: {},
settings: {
lang: null,
musicLanguage: 'all',
appearance: 'auto',
musicQuality: 320000,
lyricFontSize: 28,
outputDevice: 'default',
showPlaylistsByAppleMusic: true,
enableUnblockNeteaseMusic: true,
automaticallyCacheSongs: true,
cacheLimit: 8192,
enableReversedMode: false,
nyancatStyle: false,
showLyricsTranslation: true,
lyricsBackground: true,
enableOsdlyricsSupport: false,
closeAppOption: 'ask',
enableDiscordRichPresence: false,
enableGlobalShortcut: true,
showLibraryDefault: false,
subTitleDefault: false,
linuxEnableCustomTitlebar: false,
enabledPlaylistCategories,
proxyConfig: {
protocol: 'noProxy',
server: '',
port: null,
},
enableRealIP: false,
realIP: null,
shortcuts: shortcuts,
},
data: {
user: {},
likedSongPlaylistID: 0,
lastRefreshCookieDate: 0,
loginMode: null,
},
};
if (process.env.IS_ELECTRON === true) {
localStorage.settings.automaticallyCacheSongs = true;
}
export default localStorage;