Skip to content

Commit 9858170

Browse files
committed
发布0.2.2版本
1 parent 16711e3 commit 9858170

6 files changed

Lines changed: 26 additions & 7 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+
## [0.2.2](https://github.com/lyswhut/lx-music-desktop/compare/v0.2.1...v0.2.2) - 2019-08-21
10+
11+
### 修复
12+
13+
- 修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug
14+
- 修复播放到一半URL过期时不会刷新URL直接播放下一首的问题
15+
916
## [0.2.1](https://github.com/lyswhut/lx-music-desktop/compare/v0.2.0...v0.2.1) - 2019-08-20
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": "0.2.1",
3+
"version": "0.2.2",
44
"description": "一个免费的音乐下载助手",
55
"main": "./dist/electron/main.js",
66
"scripts": {

publish/changeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
### 修复
22

33
- 修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug
4-
4+
- 修复播放到一半URL过期时不会刷新URL直接播放下一首的问题

publish/version.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2-
"version": "0.2.1",
3-
"desc": "<h3>优化</h3>\n<ul>\n<li>新增歌曲URL存储,当URL无效时才重新获取,以减少接口不稳定的影响</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复歌曲加载无法加载时自动切换混乱的Bug</li>\n<li>修复移除列表最后一首歌曲时播放器不停止播放的问题</li>\n</ul>\n",
2+
"version": "0.2.2",
3+
"desc": "<h3>修复</h3>\n<ul>\n<li>修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug</li>\n<li>修复播放到一半URL过期时不会刷新URL直接播放下一首的问题</li>\n</ul>\n",
44
"history": [
5+
{
6+
"version": "0.2.1",
7+
"desc": "<h3>优化</h3>\n<ul>\n<li>新增歌曲URL存储,当URL无效时才重新获取,以减少接口不稳定的影响</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复歌曲加载无法加载时自动切换混乱的Bug</li>\n<li>修复移除列表最后一首歌曲时播放器不停止播放的问题</li>\n</ul>\n"
8+
},
59
{
610
"version": "0.2.0",
711
"desc": "<h3>新增</h3>\n<ul>\n<li>新增<strong>百度音乐</strong>排行榜及其音乐直接试听与下载</li>\n<li>新增网易云排行榜音乐直接试听与下载(目前仅支持128k音质)</li>\n<li>新增酷狗排行榜音乐直接试听与下载(目前仅支持128k音质)</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复更新弹窗历史版本描述多余的换行问题</li>\n<li>修复歌曲无法播放的情况下歌词仍会播放的问题</li>\n</ul>\n"

src/renderer/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default {
111111
},
112112
initPlayList() {
113113
let defaultList = this.electronStore.get('list.defaultList')
114-
console.log(defaultList)
114+
// console.log(defaultList)
115115
if (defaultList) {
116116
// defaultList.list.forEach(m => {
117117
// m.typeUrl = {}

src/renderer/components/core/Player.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export default {
7070
line: 0,
7171
},
7272
delayNextTimeout: null,
73+
audioErrorTime: 0,
7374
// retryNum: 0,
7475
}
7576
},
@@ -174,8 +175,9 @@ export default {
174175
// console.log('code', this.audio.error.code)
175176
if (!this.musicInfo.songmid) return
176177
console.log('出错')
177-
if (this.audio.error.code == 4 && this.retryNum < 3) { // 若音频URL无效则尝试刷新3次URL
178+
if (this.audio.error.code !== 1 && this.retryNum < 3) { // 若音频URL无效则尝试刷新3次URL
178179
// console.log(this.retryNum)
180+
this.audioErrorTime = this.audio.currentTime // 记录出错的播放时间
179181
this.retryNum++
180182
this.setUrl(this.list[this.playIndex], true)
181183
return
@@ -203,6 +205,10 @@ export default {
203205
})
204206
this.audio.addEventListener('loadeddata', () => {
205207
this.maxPlayTime = this.audio.duration
208+
if (this.audioErrorTime) {
209+
this.audio.currentTime = this.audioErrorTime
210+
this.audioErrorTime = 0
211+
}
206212
if (!this.targetSong.interval && this.listId != 'download') this.updateMusicInfo({ index: this.playIndex, data: { interval: formatPlayTime2(this.maxPlayTime) } })
207213
this.status = '音乐加载中...'
208214
})
@@ -249,6 +255,7 @@ export default {
249255
this.checkDelayNextTimeout()
250256
let targetSong = this.targetSong = this.list[this.playIndex]
251257
this.retryNum = 0
258+
this.audioErrorTime = 0
252259
253260
if (this.listId == 'download') {
254261
if (!checkPath(targetSong.filePath) || !targetSong.isComplate || /\.ape$/.test(targetSong.filePath)) {
@@ -369,12 +376,13 @@ export default {
369376
this.musicInfo.url = targetSong.typeUrl[type]
370377
this.status = '歌曲链接获取中...'
371378
372-
this.getUrl({ musicInfo: targetSong, type, isRefresh }).then(() => {
379+
return this.getUrl({ musicInfo: targetSong, type, isRefresh }).then(() => {
373380
this.audio.src = this.musicInfo.url = targetSong.typeUrl[type]
374381
}).catch(err => {
375382
if (err.message == requestMsg.cancelRequest) return
376383
this.status = err.message
377384
this.addDelayNextTimeout()
385+
return Promise.reject(err)
378386
})
379387
},
380388
setImg(targetSong) {

0 commit comments

Comments
 (0)