You've already forked lx-music-desktop
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59dd56e542 | ||
|
|
1bfa8dcb3f | ||
|
|
1b381af7a7 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -6,6 +6,17 @@ Project versioning adheres to [Semantic Versioning](http://semver.org/).
|
||||
Commit convention is based on [Conventional Commits](http://conventionalcommits.org).
|
||||
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
|
||||
|
||||
## [0.15.0](https://github.com/lyswhut/lx-music-desktop/compare/v0.14.1...v0.15.0) - 2020-01-23
|
||||
|
||||
洛雪提前祝大家新年快乐、身体健康、阖家幸福!
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复歌曲下载列表无法加载的问题
|
||||
- 修复歌曲下载任务数大于最大下载任务数的问题
|
||||
- 修复某些情况下歌曲下载错误的问题
|
||||
- 修复下载列表数据没有被迁移直接被丢弃的问题
|
||||
|
||||
## [0.14.1](https://github.com/lyswhut/lx-music-desktop/compare/v0.14.0...v0.14.1) - 2020-01-22
|
||||
|
||||
洛雪提前祝大家新年快乐、身体健康、阖家幸福!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lx-music-desktop",
|
||||
"version": "0.14.1",
|
||||
"version": "0.15.0",
|
||||
"description": "一个免费的音乐下载助手",
|
||||
"main": "./dist/electron/main.js",
|
||||
"productName": "lx-music-desktop",
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
|
||||
### 修复
|
||||
|
||||
- 修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题
|
||||
- 修复歌曲下载列表无法加载的问题
|
||||
- 修复歌曲下载任务数大于最大下载任务数的问题
|
||||
- 修复某些情况下歌曲下载错误的问题
|
||||
- 修复下载列表数据没有被迁移直接被丢弃的问题
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"version": "0.14.1",
|
||||
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>修复</h3>\n<ul>\n<li>修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题</li>\n</ul>\n",
|
||||
"version": "0.15.0",
|
||||
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>修复</h3>\n<ul>\n<li>修复歌曲下载列表无法加载的问题</li>\n<li>修复歌曲下载任务数大于最大下载任务数的问题</li>\n<li>修复某些情况下歌曲下载错误的问题</li>\n<li>修复下载列表数据没有被迁移直接被丢弃的问题</li>\n</ul>\n",
|
||||
"history": [
|
||||
{
|
||||
"version": "0.14.1",
|
||||
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>修复</h3>\n<ul>\n<li>修复由于旧版配置文件迁移出错导致的软件界面无法显示的问题</li>\n</ul>\n"
|
||||
},
|
||||
{
|
||||
"version": "0.14.0",
|
||||
"desc": "<p>洛雪提前祝大家新年快乐、身体健康、阖家幸福!</p>\n<h3>新增</h3>\n<ul>\n<li>新增各大平台歌单热门标签显示(显示在歌单界面的第一个下拉标签菜单中)</li>\n<li>恢复QQ音乐源128k音质试听</li>\n<li>新增不强制win7开启透明效果即可使用,但要配置运行参数<code>-nt</code>,例如:<code>.\\lx-music-desktop.exe -nt</code>,添加方法可自行百度“给快捷方式加参数”</li>\n<li>新增“新年快乐”主题,可自行切换体验</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>减淡各个主题的歌曲列表分隔线颜色</li>\n<li>在线音乐列表音质标签优化,当歌曲有无损音质时隐藏高品质标签</li>\n<li>更新改进的歌词播放插件,现在歌词的播放显示将更准确</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复咪咕源无法搜索的问题</li>\n<li>修复更新弹窗底部文字颜色没有适配当前主题颜色的问题</li>\n<li>修复导入设置窗口大小、代理设置不立即生效的问题</li>\n<li>修复在线音乐列表获取失败时无限循环请求的问题</li>\n</ul>\n<h3>其他</h3>\n<ul>\n<li>将软件设置与播放列表分离存储成两个文件</li>\n<li>更新 Electron 到 7.1.9</li>\n</ul>\n"
|
||||
|
||||
@@ -204,7 +204,7 @@ export default {
|
||||
this.initList({ defaultList, loveList })
|
||||
},
|
||||
initDownloadList() {
|
||||
let downloadList = window.electronStore_list.get('download.list')
|
||||
let downloadList = window.electronStore_list.get('downloadList')
|
||||
if (downloadList) {
|
||||
downloadList.forEach(item => {
|
||||
if (item.status == this.downloadStatus.RUN || item.status == this.downloadStatus.WAITING) {
|
||||
|
||||
@@ -210,10 +210,9 @@ const actions = {
|
||||
console.log('on complate')
|
||||
},
|
||||
onError(err) {
|
||||
// console.log(err.code, err.message)
|
||||
commit('onError', downloadInfo)
|
||||
// console.log(tryNum[downloadInfo.key])
|
||||
if (++tryNum[downloadInfo.key] > 2) {
|
||||
commit('onError', downloadInfo)
|
||||
_this.dispatch('download/startTask')
|
||||
return
|
||||
}
|
||||
@@ -226,9 +225,8 @@ const actions = {
|
||||
}
|
||||
},
|
||||
onFail(response) {
|
||||
commit('onError', downloadInfo)
|
||||
|
||||
if (++tryNum[downloadInfo.key] > 2) {
|
||||
commit('onError', downloadInfo)
|
||||
_this.dispatch('download/startTask')
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,7 +19,11 @@ if (!electronStore_config.get('version') && electronStore_config.get('setting'))
|
||||
if (list.loveList) electronStore_list.set('loveList', list.loveList)
|
||||
electronStore_config.delete('list')
|
||||
}
|
||||
if (electronStore_config.get('download')) electronStore_config.delete('download')
|
||||
const downloadList = electronStore_config.get('download')
|
||||
if (downloadList) {
|
||||
if (downloadList.list) electronStore_list.set('downloadList', downloadList.list)
|
||||
electronStore_config.delete('download')
|
||||
}
|
||||
}
|
||||
const { version: settingVersion, setting } = updateSetting(electronStore_config.get('setting'), electronStore_config.get('version'))
|
||||
electronStore_config.set('version', settingVersion)
|
||||
|
||||
@@ -59,7 +59,7 @@ class Task extends EventEmitter {
|
||||
__init() {
|
||||
this.status = STATUS.init
|
||||
const { path, startByte, endByte } = this.chunkInfo
|
||||
if (startByte) this.requestOptions.headers.range = `bytes=${startByte}-${endByte}`
|
||||
if (startByte != null) this.requestOptions.headers.range = `bytes=${startByte}-${endByte}`
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!path) return resolve()
|
||||
fs.stat(path, (errStat, stats) => {
|
||||
@@ -110,6 +110,16 @@ class Task extends EventEmitter {
|
||||
this.request = request(url, options)
|
||||
.on('response', response => {
|
||||
if (response.statusCode !== 200 && response.statusCode !== 206) {
|
||||
if (response.statusCode == 416) {
|
||||
fs.unlink(this.chunkInfo.path, async err => {
|
||||
await this.__handleError(new Error(response.statusMessage))
|
||||
this.chunkInfo.startByte = 0
|
||||
this.resumeLastChunk = null
|
||||
this.progress.downloaded = 0
|
||||
if (err) this.__handleError(err)
|
||||
})
|
||||
return
|
||||
}
|
||||
this.status = STATUS.failed
|
||||
this.emit('fail', response)
|
||||
this.__closeRequest()
|
||||
@@ -154,9 +164,14 @@ class Task extends EventEmitter {
|
||||
this.ws = fs.createWriteStream(this.chunkInfo.path, options)
|
||||
|
||||
this.ws.on('finish', () => this.__closeWriteStream())
|
||||
this.ws.on('error', async err => {
|
||||
await this.__handleError(err)
|
||||
fs.unlink(this.chunkInfo.path, () => this.__handleError(err))
|
||||
this.ws.on('error', err => {
|
||||
fs.unlink(this.chunkInfo.path, async unlinkErr => {
|
||||
await this.__handleError(err)
|
||||
this.chunkInfo.startByte = 0
|
||||
this.resumeLastChunk = null
|
||||
this.progress.downloaded = 0
|
||||
if (unlinkErr) this.__handleError(unlinkErr)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user