修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题

pull/166/head
lyswhut 2020-01-22 22:30:50 +08:00
parent 78bef70735
commit 231fe54408
2 changed files with 8 additions and 27 deletions

View File

@ -1,26 +1,5 @@
洛雪提前祝大家新年快乐、身体健康、阖家幸福!
### 新增
- 新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中)
- 恢复QQ音乐源128k音质试听
- 新增不强制win7开启透明效果即可使用但要配置运行参数`-nt`,例如:`.\lx-music-desktop.exe -nt`,添加方法可自行百度“给快捷方式加参数”
- 新增“新年快乐”主题,可自行切换体验
### 优化
- 减淡各个主题的歌曲列表分隔线颜色
- 在线音乐列表音质标签优化,当歌曲有无损音质时隐藏高品质标签
- 更新改进的歌词播放插件,现在歌词的播放显示将更准确
### 修复
- 修复咪咕源无法搜索的问题
- 修复更新弹窗底部文字颜色没有适配当前主题颜色的问题
- 修复导入设置窗口大小、代理设置不立即生效的问题
- 修复在线音乐列表获取失败时无限循环请求的问题
### 其他
- 将软件设置与播放列表分离存储成两个文件
- 更新 Electron 到 7.1.9
- 修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题

View File

@ -11,13 +11,15 @@ const electronStore_config = window.electronStore_config = new Store({
name: 'config',
})
if (!electronStore_config.get('version') && electronStore_config.get('setting')) { // 迁移配置
electronStore_list.set('defaultList', electronStore_config.get('list.defaultList'))
electronStore_list.set('loveList', electronStore_config.get('list.loveList'))
electronStore_list.set('downloadList', electronStore_config.get('download.list'))
electronStore_config.set('version', electronStore_config.get('setting.version'))
electronStore_config.delete('setting.version')
electronStore_config.delete('list')
electronStore_config.delete('download')
const list = electronStore_config.get('list')
if (list) {
if (list.defaultList) electronStore_list.set('defaultList', list.defaultList)
if (list.loveList) electronStore_list.set('loveList', list.loveList)
electronStore_config.delete('list')
}
if (electronStore_config.get('download')) electronStore_config.delete('download')
}
const { version: settingVersion, setting } = updateSetting(electronStore_config.get('setting'), electronStore_config.get('version'))
electronStore_config.set('version', settingVersion)