Skip to content

Commit

Permalink
发布0.3.5版本
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Aug 30, 2019
1 parent 1786376 commit c81c33a
Show file tree
Hide file tree
Showing 18 changed files with 124 additions and 110 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

### 优化
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ npm run pack

### 致谢

感谢 [@messoer](https://github.com/messoer) 提供的部分音乐API
感谢 [@messoer](https://github.com/messoer) 曾经提供的部分音乐API

### 免责声明

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 7 additions & 2 deletions publish/changeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
### 新增

- 新增**测试接口**,该接口同样速度较慢,但软件的大部分功能可用,**请自行切换到该接口**,找接口辛苦,且用且珍惜!

### 优化

- 减少接口不稳定带来的影响,适当增加请求等待时间
- 取消需要刷新URL时windows任务栏进度显示错误状态(现显示为暂停状态)

### 修复

- 修复播放过程中URL过期不会刷新URL的问题
- 修复使用临时接口时在试听列表双击灰色歌曲仍然会进行播放的Bug
- 修复歌词加载Bug
8 changes: 6 additions & 2 deletions publish/version.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
21 changes: 3 additions & 18 deletions src/renderer/components/core/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) { // 若音频URL无效则尝试刷新3次URL
// console.log(this.retryNum)
this.audioErrorTime = this.audio.currentTime // 记录出错的播放时间
Expand All @@ -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()
})
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/modules/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const updateSetting = setting => {
},
themeId: 0,
sourceId: 'kw',
apiSource: 'temp',
apiSource: 'test',
randomAnimate: true,
ignoreVersion: null,
}
Expand All @@ -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
}

Expand Down
40 changes: 20 additions & 20 deletions src/renderer/utils/music/api-source.js
Original file line number Diff line number Diff line change
@@ -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,
}

Expand All @@ -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`]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -38,4 +38,4 @@ const api_messoer = {
},
}

export default api_messoer
export default api_test
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -38,4 +38,4 @@ const api_messoer = {
},
}

export default api_messoer
export default api_test
30 changes: 0 additions & 30 deletions src/renderer/utils/music/kw/api-messoer.js

This file was deleted.

30 changes: 30 additions & 0 deletions src/renderer/utils/music/kw/api-test.js
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -38,4 +38,4 @@ const api_messoer = {
},
}

export default api_messoer
export default api_test
4 changes: 2 additions & 2 deletions src/renderer/views/Leaderboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)') +
Expand Down Expand Up @@ -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
},
Expand Down
Loading

0 comments on commit c81c33a

Please sign in to comment.