Skip to content

Commit ff47a22

Browse files
committed
Merge branch 'dev'
2 parents b726ee4 + 8810e25 commit ff47a22

8 files changed

Lines changed: 31 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Project versioning adheres to [Semantic Versioning](http://semver.org/).
66
Commit convention is based on [Conventional Commits](http://conventionalcommits.org).
77
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
88

9+
## [1.14.1](https://github.com/lyswhut/lx-music-desktop/compare/v1.14.0...v1.14.1) - 2021-10-04
10+
11+
### 修复
12+
13+
- 修复我的列表搜索无法搜索小括号、中括号等字符的问题
14+
- 修复v1.14.0出现的备份与恢复功能备份的数据无法恢复的问题,同时兼容使用v1.14.0导出的存在问题的数据
15+
916
## [1.14.0](https://github.com/lyswhut/lx-music-desktop/compare/v1.13.0...v1.14.0) - 2021-10-02
1017

1118
### 新增

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lx-music-desktop",
3-
"version": "1.14.0",
3+
"version": "1.14.1",
44
"description": "一个免费的音乐查找助手",
55
"main": "./dist/electron/main.js",
66
"productName": "lx-music-desktop",

publish/changeLog.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
### 新增
2-
3-
- 新增歌词简体中文转繁体中文,当软件语言被设置为繁体中文后,播放歌曲的歌词也将自动转成繁体中文显示
4-
- 新增单个列表导入/导出功能,可以方便分享歌曲列表,可在右击“我的列表”里的列表名后弹出的菜单中使用
5-
- 新增删除列表前的确认弹窗,防止误删列表
6-
- 新增歌词文本选择复制功能,可在详情页进度条上方的歌词文本选择按钮进入歌词文本选择模式,选择完成后可鼠标右击或者使用系统快捷键复制
7-
- 新增重复歌曲列表,可以方便移除我的列表中的重复歌曲,此列表会列出目标列表里歌曲名相同的歌曲,可在右击“我的列表”里的列表名后弹出的菜单中使用
8-
91
### 修复
102

11-
- 修复mg排行榜无法加载的问题
12-
- 修复点击播放详情页的进度条跳进度时会出现偏移的问题
13-
- 修复在有提示信息的地方长按鼠标按键时提示信息会闪烁的问题
14-
- 修复下载歌曲时的歌词下载不尝试获取缓存歌词的问题
15-
- 修复GNOME等桌面下每次打开应用时需重新设置歌词窗口置顶的问题
3+
- 修复我的列表搜索无法搜索小括号、中括号等字符的问题
4+
- 修复v1.14.0出现的备份与恢复功能备份的数据无法恢复的问题,同时兼容使用v1.14.0导出的存在问题的数据

publish/version.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/renderer/components/material/SearchList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export default {
239239
handleSearch() {
240240
if (!this.text.length) return this.resultList = []
241241
let list = []
242-
let rxp = new RegExp(this.text.split('').join('.*') + '.*', 'i')
242+
let rxp = new RegExp(this.text.split('').map(s => s.replace(/[.*+?^${}()|[\]\\]/, '\\$&')).join('.*') + '.*', 'i')
243243
for (const item of this.list) {
244244
if (rxp.test(`${item.name}${item.singer}${item.albumName ? item.albumName : ''}`)) list.push(item)
245245
}

src/renderer/utils/index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,18 @@ export const readLxConfigFile = async path => {
464464
let data = await fs.promises.readFile(path, isJSON ? 'utf8' : 'binary')
465465
if (!data || isJSON) return data
466466
data = await gunzipData(Buffer.from(data, 'binary'))
467-
return data.toString('utf8')
467+
data = JSON.parse(data.toString('utf8'))
468+
469+
// 修复v1.14.0出现的导出数据被序列化两次的问题
470+
if (typeof data != 'object') {
471+
try {
472+
data = JSON.parse(data)
473+
} catch (err) {
474+
return data
475+
}
476+
}
477+
478+
return data
468479
}
469480

470481

src/renderer/views/List.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ export default {
10501050
if (result.canceled) return
10511051
let listData
10521052
try {
1053-
listData = JSON.parse(await readLxConfigFile(result.filePaths[0]))
1053+
listData = await readLxConfigFile(result.filePaths[0])
10541054
} catch (error) {
10551055
return
10561056
}

src/renderer/views/Setting.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ export default {
815815
async importSetting(path) {
816816
let settingData
817817
try {
818-
settingData = JSON.parse(await readLxConfigFile(path))
818+
settingData = await readLxConfigFile(path)
819819
} catch (error) {
820820
return
821821
}
@@ -830,12 +830,12 @@ export default {
830830
type: 'setting',
831831
data: Object.assign({ version: this.settingVersion }, this.setting),
832832
}
833-
saveLxConfigFile(path, JSON.stringify(data))
833+
saveLxConfigFile(path, data)
834834
},
835835
async importPlayList(path) {
836836
let listData
837837
try {
838-
listData = JSON.parse(await readLxConfigFile(path))
838+
listData = await readLxConfigFile(path)
839839
} catch (error) {
840840
return
841841
}
@@ -867,12 +867,12 @@ export default {
867867
if (item.otherSource) delete item.otherSource
868868
}
869869
}
870-
saveLxConfigFile(path, JSON.stringify(data))
870+
saveLxConfigFile(path, data)
871871
},
872872
async importAllData(path) {
873873
let allData
874874
try {
875-
allData = JSON.parse(await readLxConfigFile(path))
875+
allData = await readLxConfigFile(path)
876876
} catch (error) {
877877
return
878878
}
@@ -906,7 +906,7 @@ export default {
906906
if (item.otherSource) delete item.otherSource
907907
}
908908
}
909-
saveLxConfigFile(path, JSON.stringify(allData))
909+
saveLxConfigFile(path, allData)
910910
},
911911
handleImportAllData() {
912912
selectDir({

0 commit comments

Comments
 (0)