发布0.3.5版本

pull/96/head v0.3.5
lyswhut 2019-08-30 13:11:02 +08:00
parent 1786376a9e
commit c81c33a430
18 changed files with 124 additions and 110 deletions

View File

@ -6,6 +6,21 @@ 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.3.5](https://github.com/lyswhut/lx-music-desktop/compare/v0.3.4...v0.3.5) - 2019-08-30
### 新增
- 新增**测试接口**,该接口同样速度较慢,但软件的大部分功能可用,**请自行切换到该接口**,找接口辛苦,且用且珍惜!
### 优化
- 取消需要刷新URL时windows任务栏进度显示错误状态现显示为暂停状态
### 修复
- 修复使用临时接口时在试听列表双击灰色歌曲仍然会进行播放的Bug
- 修复歌词加载Bug
## [0.3.4](https://github.com/lyswhut/lx-music-desktop/compare/v0.3.3...v0.3.4) - 2019-08-29
### 优化

View File

@ -83,7 +83,7 @@ npm run pack
### 致谢
感谢 [@messoer](https://github.com/messoer) 提供的部分音乐API
感谢 [@messoer](https://github.com/messoer) 曾经提供的部分音乐API
### 免责声明

View File

@ -1,6 +1,6 @@
{
"name": "lx-music-desktop",
"version": "0.3.4",
"version": "0.3.5",
"description": "一个免费的音乐下载助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",

View File

@ -1,7 +1,12 @@
### 新增
- 新增**测试接口**,该接口同样速度较慢,但软件的大部分功能可用,**请自行切换到该接口**,找接口辛苦,且用且珍惜!
### 优化
- 减少接口不稳定带来的影响,适当增加请求等待时间
- 取消需要刷新URL时windows任务栏进度显示错误状态现显示为暂停状态
### 修复
- 修复播放过程中URL过期不会刷新URL的问题
- 修复使用临时接口时在试听列表双击灰色歌曲仍然会进行播放的Bug
- 修复歌词加载Bug

View File

@ -1,7 +1,11 @@
{
"version": "0.3.4",
"desc": "<h3>优化</h3>\n<ul>\n<li>减少接口不稳定带来的影响,适当增加请求等待时间</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复播放过程中URL过期不会刷新URL的问题</li>\n</ul>\n",
"version": "0.3.5",
"desc": "<h3>新增</h3>\n<ul>\n<li>新增<strong>测试接口</strong>,该接口同样速度较慢,但软件的大部分功能可用,<strong>请自行切换到该接口</strong>,找接口辛苦,且用且珍惜!</li>\n</ul>\n<h3>优化</h3>\n<ul>\n<li>取消需要刷新URL时windows任务栏进度显示错误状态现显示为暂停状态</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复使用临时接口时在试听列表双击灰色歌曲仍然会进行播放的Bug</li>\n<li>修复歌词加载Bug</li>\n</ul>\n",
"history": [
{
"version": "0.3.4",
"desc": "<h3>优化</h3>\n<ul>\n<li>减少接口不稳定带来的影响,适当增加请求等待时间</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>修复播放过程中URL过期不会刷新URL的问题</li>\n</ul>\n"
},
{
"version": "0.3.3",
"desc": "<h3>修复</h3>\n<ul>\n<li><strong>messoer</strong>的接口已经关闭,暂时切换到临时接口使用,部分功能受限。。。</li>\n<li>修复设置界面更新出错时仍然显示更新下载中的问题</li>\n<li>修复手动定位播放进度条时存在偏差的问题</li>\n<li>屏蔽播放器中没有歌曲时对进度条的点击</li>\n</ul>\n"

View File

@ -195,7 +195,6 @@ export default {
if (!this.musicInfo.songmid) return
console.log('出错')
this.stopPlay()
this.sendProgressEvent(this.progress, 'error')
if (this.audio.error.code !== 1 && this.retryNum < 3) { // URL3URL
// console.log(this.retryNum)
this.audioErrorTime = this.audio.currentTime //
@ -205,21 +204,7 @@ export default {
return
}
// let urls = this.player_info.targetSong.urls
// if (urls && urls.some((url, index) => {
// if (this.musicInfo.musicUrl.includes(url)) {
// let newUrl = urls[index + 1]
// if (!newUrl) return false
// this.musicInfo.musicUrl = this.musicInfo.musicUrl.replace(url, newUrl)
// // this.musicInfo.musicUrl = newUrl ? this.musicInfo.musicUrl.replace(url, newUrl) : this.setFormTag(this.musicInfo.musicUrl.replace(url, urls[0]))
// return true
// }
// })) {
// this.audio.src = this.musicInfo.musicUrl
// // console.log(this.musicInfo.musicUrl)
// } else {
// this.handleNext()
// }
this.sendProgressEvent(this.progress, 'error')
this.status = '音频加载出错5 秒后切换下一首'
this.addDelayNextTimeout()
})
@ -416,12 +401,12 @@ export default {
}
},
setLrc(targetSong) {
this.musicInfo.lrc = targetSong.lyric
this.musicInfo.lrc = targetSong.lrc
let lrcP = this.musicInfo.lrc
? Promise.resolve()
: this.getLrc(targetSong).then(() => {
this.musicInfo.lrc = targetSong.lyric
this.musicInfo.lrc = targetSong.lrc
})
lrcP

View File

@ -62,7 +62,7 @@ const mutations = {
datas.musicInfo.img = datas.url
},
setLrc(state, datas) {
datas.musicInfo.lyric = datas.lrc
datas.musicInfo.lrc = datas.lrc
},
setList(state, { list, listId, index }) {
state.list = list

View File

@ -185,7 +185,7 @@ export const updateSetting = setting => {
},
themeId: 0,
sourceId: 'kw',
apiSource: 'temp',
apiSource: 'test',
randomAnimate: true,
ignoreVersion: null,
}
@ -202,7 +202,7 @@ export const updateSetting = setting => {
objectDeepMerge(defaultSetting, overwriteSetting)
setting = defaultSetting
}
if (setting.apiSource == 'messoer') setting.apiSource = 'temp' // 强制设置回 temp 接口源
if (setting.apiSource != 'test') setting.apiSource = 'test' // 强制设置回 test 接口源
return setting
}

View File

@ -1,26 +1,26 @@
import kw_api_temp from './kw/api-temp'
// import kw_api_messoer from './kw/api-messoer'
import kw_api_test from './kw/api-test'
// import tx_api_messoer from './tx/api-messoer'
// import kg_api_messoer from './kg/api-messoer'
// import wy_api_messoer from './wy/api-messoer'
// import bd_api_messoer from './bd/api-messoer'
import kw_api_internal from './kw/api-internal'
import tx_api_internal from './tx/api-internal'
import kg_api_internal from './kg/api-internal'
import wy_api_internal from './wy/api-internal'
import bd_api_internal from './bd/api-internal'
import kg_api_test from './kg/api-test'
import wy_api_test from './wy/api-test'
import bd_api_test from './bd/api-test'
// import kw_api_internal from './kw/api-internal'
// import tx_api_internal from './tx/api-internal'
// import kg_api_internal from './kg/api-internal'
// import wy_api_internal from './wy/api-internal'
// import bd_api_internal from './bd/api-internal'
const apis = {
// kw_api_messoer,
kw_api_test,
// tx_api_messoer,
// kg_api_messoer,
// wy_api_messoer,
// bd_api_messoer,
kw_api_internal,
tx_api_internal,
kg_api_internal,
wy_api_internal,
bd_api_internal,
kg_api_test,
wy_api_test,
bd_api_test,
// kw_api_internal,
// tx_api_internal,
// kg_api_internal,
// wy_api_internal,
// bd_api_internal,
kw_api_temp,
}
@ -29,8 +29,8 @@ const getAPI = source => {
switch (window.globalObj.apiSource) {
// case 'messoer':
// return apis[`${source}_api_messoer`]
case 'internal':
return apis[`${source}_api_internal`]
case 'test':
return apis[`${source}_api_test`]
case 'temp':
return apis[`${source}_api_temp`]
}

View File

@ -1,10 +1,10 @@
import { httpFatch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../messoer'
import { headers, timeout } from '../options'
const api_messoer = {
const api_test = {
getMusicUrl(songInfo, type) {
const requestObj = httpFatch(`https://v1.itooi.cn/baidu/url?id=${songInfo.songmid}&quality=${type.replace(/k$/, '')}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/baidu/url?id=${songInfo.songmid}&quality=${type.replace(/k$/, '')}`, {
method: 'get',
timeout,
headers,
@ -15,7 +15,7 @@ const api_messoer = {
return requestObj
},
getPic(songInfo, size = '500') {
const requestObj = httpFatch(`https://v1.itooi.cn/baidu/pic?id=${songInfo.songmid}&imageSize=${size}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/baidu/pic?id=${songInfo.songmid}&imageSize=${size}`, {
method: 'get',
timeout,
headers,
@ -26,7 +26,7 @@ const api_messoer = {
return requestObj
},
getLyric(songInfo) {
const requestObj = httpFatch(`https://v1.itooi.cn/baidu/lrc?id=${songInfo.songmid}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/baidu/lrc?id=${songInfo.songmid}`, {
method: 'get',
timeout,
headers,
@ -38,4 +38,4 @@ const api_messoer = {
},
}
export default api_messoer
export default api_test

View File

@ -1,10 +1,10 @@
import { httpFatch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../messoer'
import { headers, timeout } from '../options'
const api_messoer = {
const api_test = {
getMusicUrl(songInfo, type) {
const requestObj = httpFatch(`https://v1.itooi.cn/kugou/url?id=${songInfo._types[type].hash}&quality=${type.replace(/k$/, '')}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/kugou/url?id=${songInfo._types[type].hash}&quality=${type.replace(/k$/, '')}`, {
method: 'get',
timeout,
headers,
@ -15,7 +15,7 @@ const api_messoer = {
return requestObj
},
getPic(songInfo) {
const requestObj = httpFatch(`https://v1.itooi.cn/kugou/pic?id=${songInfo.hash}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/kugou/pic?id=${songInfo.hash}`, {
method: 'get',
timeout,
headers,
@ -26,7 +26,7 @@ const api_messoer = {
return requestObj
},
getLyric(songInfo) {
const requestObj = httpFatch(`https://v1.itooi.cn/kugou/lrc?id=${songInfo.hash}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/kugou/lrc?id=${songInfo.hash}`, {
method: 'get',
timeout,
headers,
@ -38,4 +38,4 @@ const api_messoer = {
},
}
export default api_messoer
export default api_test

View File

@ -1,30 +0,0 @@
import { httpFatch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../messoer'
const api_messoer = {
getMusicUrl(songInfo, type) {
const requestObj = httpFatch(`https://v1.itooi.cn/kuwo/url?id=${songInfo.songmid}&quality=${type.replace(/k$/, '')}&isRedirect=0`, {
method: 'get',
timeout,
headers,
})
requestObj.promise = requestObj.promise.then(({ body }) => {
return body.code === 200 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(requestMsg.fail))
})
return requestObj
},
getPic(songInfo) {
const requestObj = httpFatch(`https://v1.itooi.cn/kuwo/pic?id=${songInfo.songmid}&isRedirect=0`, {
method: 'get',
timeout,
headers,
})
requestObj.promise = requestObj.promise.then(({ body }) => {
return body.code === 200 ? Promise.resolve(body.data) : Promise.reject(new Error(requestMsg.fail))
})
return requestObj
},
}
export default api_messoer

View File

@ -0,0 +1,30 @@
import { httpFatch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../options'
const api_test = {
// getMusicUrl(songInfo, type) {
// const requestObj = httpFatch(`http://45.32.53.128:3002/m/kw/u/${songInfo.songmid}/${type}`, {
// method: 'get',
// headers,
// timeout,
// })
// requestObj.promise = requestObj.promise.then(({ body }) => {
// return body.code === 0 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(body.msg))
// })
// return requestObj
// },
getMusicUrl(songInfo, type) {
const requestObj = httpFatch(`http://45.32.53.128:3000/kuwo/url?id=${songInfo.songmid}&quality=${type.replace(/k$/, '')}`, {
method: 'get',
timeout,
headers,
})
requestObj.promise = requestObj.promise.then(({ body }) => {
return body.code === 200 ? Promise.resolve({ type, url: body.data }) : Promise.reject(new Error(requestMsg.fail))
})
return requestObj
},
}
export default api_test

View File

@ -4,7 +4,7 @@ import { headers, timeout } from '../messoer'
const api_messoer = {
getMusicUrl(songInfo, type) {
const requestObj = httpFatch(`https://v1.itooi.cn/tencent/url?id=${songInfo.strMediaMid}&quality=${type.replace(/k$/, '')}&isRedirect=0`, {
const requestObj = httpFatch(`https://v1.itooi.cn/tencent/url?id=${songInfo.strMediaMid}&quality=${type.replace(/k$/, '')}`, {
method: 'get',
timeout,
headers,

View File

@ -1,10 +1,10 @@
import { httpFatch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../messoer'
import { headers, timeout } from '../options'
const api_messoer = {
const api_test = {
getMusicUrl(songInfo, type) {
const requestObj = httpFatch(`https://v1.itooi.cn/netease/url?id=${songInfo.songmid}&quality=${type.replace(/k$/, '')}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/netease/url?id=${songInfo.songmid}&quality=${type.replace(/k$/, '')}`, {
method: 'get',
timeout,
headers,
@ -15,7 +15,7 @@ const api_messoer = {
return requestObj
},
getPic(songInfo) {
const requestObj = httpFatch(`https://v1.itooi.cn/netease/pic?id=${songInfo.songmid}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/netease/pic?id=${songInfo.songmid}`, {
method: 'get',
timeout,
headers,
@ -26,7 +26,7 @@ const api_messoer = {
return requestObj
},
getLyric(songInfo) {
const requestObj = httpFatch(`https://v1.itooi.cn/netease/lrc?id=${songInfo.songmid}&isRedirect=0`, {
const requestObj = httpFatch(`http://45.32.53.128:3000/netease/lrc?id=${songInfo.songmid}`, {
method: 'get',
timeout,
headers,
@ -38,4 +38,4 @@ const api_messoer = {
},
}
export default api_messoer
export default api_test

View File

@ -30,7 +30,7 @@
td.break(style="width: 20%;") {{item.singer}}
td.break(style="width: 22%;") {{item.albumName}}
td(style="width: 18%;")
material-list-buttons(:index="index" :search-btn="true" :play-btn="item.source == 'kw' || !isAPITemp" :download-btn="item.source == 'kw' || !isAPITemp" :remove-btn="false" @btn-click="handleListBtnClick")
material-list-buttons(:index="index" :search-btn="true" :play-btn="item.source == 'kw' || (!isAPITemp && item.source != 'tx')" :download-btn="item.source == 'kw' || (!isAPITemp && item.source != 'tx')" :remove-btn="false" @btn-click="handleListBtnClick")
//- button.btn-info(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k'] || item._types.flac" @click.stop='openDownloadModal(index)')
//- button.btn-secondary(type='button' v-if="item._types['128k'] || item._types['192k'] || item._types['320k']" @click.stop='testPlay(index)')
//- button.btn-success(type='button' v-if="(item._types['128k'] || item._types['192k'] || item._types['320k']) && userInfo" @click.stop='showListModal(index)')
@ -123,7 +123,7 @@ export default {
this.clickIndex = index
return
}
(this.source == 'kw' || !this.isAPITemp) ? this.testPlay(index) : this.handleSearch(index)
(this.source == 'kw' || (!this.isAPITemp && this.list[index].source != 'tx')) ? this.testPlay(index) : this.handleSearch(index)
this.clickTime = 0
this.clickIndex = -1
},

View File

@ -18,7 +18,7 @@
table
tbody
tr(v-for='(item, index) in list' :key='item.songmid'
@click="handleDoubleClick(index)" :class="[isPlayList && playIndex === index ? $style.active : '', isAPITemp && item.source != 'kw' ? $style.disabled : '']")
@click="handleDoubleClick(index)" :class="[isPlayList && playIndex === index ? $style.active : '', (isAPITemp && item.source != 'kw') || item.source == 'tx' ? $style.disabled : '']")
td.nobreak.center(style="width: 37px;" @click.stop)
material-checkbox(:id="index.toString()" v-model="selectdData" :value="item")
td.break(style="width: 25%;") {{item.name}}
@ -137,6 +137,7 @@ export default {
this.clickIndex = -1
},
testPlay(index) {
if ((this.isAPITemp && this.list[index].source != 'kw') || this.list[index].source == 'tx') return
this.setList({ list: this.list, listId: 'test', index })
},
handleRemove(index) {
@ -146,14 +147,13 @@ export default {
switch (info.action) {
case 'download':
const minfo = this.list[info.index]
if (this.isAPITemp && minfo.source != 'kw') return
if ((this.isAPITemp && minfo.source != 'kw') || minfo.source == 'tx') return
this.musicInfo = minfo
this.$nextTick(() => {
this.isShowDownload = true
})
break
case 'play':
if (this.isAPITemp && this.list[info.index].source != 'kw') return
this.testPlay(info.index)
break
case 'remove':
@ -173,7 +173,7 @@ export default {
this.selectdData = []
},
handleAddDownloadMultiple(type) {
const list = this.setting.apiSource == 'temp' ? this.selectdData.filter(s => s.source == 'kw') : [...this.selectdData]
const list = this.setting.apiSource == 'temp' ? this.selectdData.filter(s => s.source == 'kw') : this.selectdData.filter(s => s.source != 'tx')
this.createDownloadMultiple({ list, type })
this.resetSelect()
this.isShowDownloadMultiple = false

View File

@ -93,9 +93,9 @@ div.scroll(:class="$style.setting")
strong 使用者
| 承担
p.small
| 本软件的部分接口使用自 https://github.com/messoer
| 怀念曾经的
strong @messoer
|
| 非常感谢曾经为本软件提供数据源
p.small 若有问题可 mail tolyswhut@qq.com 或到 GitHub 提交 issue
p.small
| 若觉得好用的话可以去 GitHub 点个
@ -162,17 +162,22 @@ export default {
},
],
apiSources: [
{
id: 'messoer',
// label: ' messoer ',
label: '由 messoer 提供的接口(该接口已关闭)',
disabled: true,
},
// {
// id: 'messoer',
// // label: ' messoer ',
// label: ' messoer ',
// disabled: true,
// },
// {
// id: 'internal',
// label: '128k',
// disabled: false,
// },
{
id: 'test',
label: '测试接口(软件的大部分功能可用,该接口访问速度较慢,请耐心等待)',
disabled: false,
},
{
id: 'temp',
label: '临时接口(软件的某些功能不可用,该接口访问速度较慢,请耐心等待)',