Skip to content

Commit

Permalink
更新到v0.2.3版本
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Aug 22, 2019
1 parent 893d20b commit 2b3aab2
Show file tree
Hide file tree
Showing 19 changed files with 128 additions and 49 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@ 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.2.3](https://github.com/lyswhut/lx-music-desktop/compare/v0.2.2...v0.2.3) - 2019-08-22

### 新增

- 新增任务栏程序标题改变功能(播放歌曲时任务栏标题将显示当前播放的歌曲)

### 修复

- 使用临时接口时,试听列表中的下载按钮仍然能点击的Bug
- 修复某些情况下歌曲链接未能缓存的问题

### 移除

- 移除临时接口(因服务器被攻击,本接口已关闭)
- 移除列表栏设置的隐藏专辑栏选项(感觉这个设置并没有什么luan用,并且还会打破布局)

## [0.2.2](https://github.com/lyswhut/lx-music-desktop/compare/v0.2.2...v0.2.2) - 2019-08-22

### 新增

- 新增任务栏程序标题改变功能(播放歌曲时任务栏标题将显示当前播放的歌曲)

### 修复

- 使用临时接口时,试听列表中的下载按钮仍然能点击的Bug
- 修复某些情况下歌曲链接未能缓存的问题

### 移除

- 移除临时接口(因服务器被攻击,本接口已关闭)
- 移除列表栏设置的隐藏专辑栏选项(感觉这个设置并没有什么luan用,并且还会打破布局)

## [0.2.2](https://github.com/lyswhut/lx-music-desktop/compare/v0.2.1...v0.2.2) - 2019-08-21

### 修复
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@
- Vue 2.x

软件变化请查看:[更新日志](https://github.com/lyswhut/lx-music-desktop/blob/master/CHANGELOG.md)<br>
软件下载请转到:[发布页面](https://github.com/lyswhut/lx-music-desktop/releases)

其他说明:TODO
软件下载请转到:[发布页面](https://github.com/lyswhut/lx-music-desktop/releases)<br>
或者到网盘下载:<br>
`https://www.lanzous.com/b906260/`<br>
`密码:glqw`

#### 关于软件更新

软件启动时若发现新版本时会自动从本仓库下载安装包,下载完毕会弹窗提示更新。<br>
若下载未完成时软件被关闭,下次启动软件会再次自动下载。<br>
目前暂未添加跳过更新某个版本的功能。<br>
**注意:**绿色版的软件更新功能不可用!

### 源码使用方法

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ platform:
cache:
- node_modules
- '%APPDATA%\npm-cache'
# - '%USERPROFILE%\.electron'
- '%LOCALAPPDATA%\electron\Cache'

install:
- ps: Install-Product node 12 x64
- npm install

build_script:
- npm run pub:gh
- npm run publish:gh

test: off

Expand Down
5 changes: 0 additions & 5 deletions build-config/main/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ module.exports = {
libraryTarget: 'commonjs2',
path: path.join(__dirname, '../../dist/electron'),
},
externals: [
// suppress electron-debug warning
// see https://github.com/SimulatedGREG/electron-vue/issues/498
{ 'electron-debug': 'electron-debug' },
],
resolve: {
alias: {
common: path.join(__dirname, '../../src/common'),
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 34 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
{
"name": "lx-music-desktop",
"version": "0.2.2",
"version": "0.2.3",
"description": "一个免费的音乐下载助手",
"main": "./dist/electron/main.js",
"productName": "lx-music-desktop",
"scripts": {
"pack": "node build-config/pack.js && npm run pack:win:setup",
"pack:win": "npm run pack:win:setup && npm run pack:win:7z",
"pack:win:setup": "cross-env TARGET=Setup ARCH=x64_x86 electron-builder -w=nsis",
"pack:win:portable": "npm run pack:win:portable:x64_x86 && npm run pack:win:portable:x64 && npm run pack:win:portable:x86",
"pack:win:portable:x64_x86": "cross-env TARGET=便携版 ARCH=x64_x86 electron-builder -w=portable --x64 --ia32",
"pack:win:portable:x64": "cross-env TARGET=便携版 ARCH=x64 electron-builder -w=portable --x64",
"pack:win:portable:x86": "cross-env TARGET=便携版 ARCH=x86 electron-builder -w=portable --ia32",
"pack:win:7z": "npm run pack:win:7z:x64 && npm run pack:win:7z:x86",
"pack:win:7z:x64": "cross-env TARGET=绿色版 ARCH=x64 electron-builder -w=7z --x64",
"pack:win:7z:x86": "cross-env TARGET=绿色版 ARCH=x86 electron-builder -w=7z --ia32",
"publish": "node publish",
"pub:gh": "node build-config/pack.js && electron-builder --win -p always",
"pack": "node build-config/pack.js && electron-builder -w",
"publish:gh": "node build-config/pack.js && npm run publish:win",
"publish:win": "npm run publish:win:setup && npm run publish:win:7z",
"publish:win:setup": "cross-env TARGET=Setup ARCH=x64_x86 electron-builder -w=nsis --x64 --ia32 -p always",
"publish:win:portable": "npm run publish:win:portable:x64_x86 && npm run publish:win:portable:x64 && npm run publish:win:portable:x86",
"publish:win:portable:x64_x86": "cross-env TARGET=portable ARCH=x64_x86 electron-builder -w=portable --x64 --ia32 -p onTagOrDraft",
"publish:win:portable:x64": "cross-env TARGET=portable ARCH=x64 electron-builder -w=portable --x64 -p onTagOrDraft",
"publish:win:portable:x86": "cross-env TARGET=portable ARCH=x86 electron-builder -w=portable --ia32 -p onTagOrDraft",
"publish:win:7z": "npm run publish:win:7z:x64 && npm run publish:win:7z:x86",
"publish:win:7z:x64": "cross-env TARGET=green ARCH=x64 electron-builder -w=7z --x64 -p onTagOrDraft",
"publish:win:7z:x86": "cross-env TARGET=green ARCH=x86 electron-builder -w=7z --ia32 -p onTagOrDraft",
"pack:linux": "node build-config/pack.js && electron-builder -l",
"pack:dir": "node build-config/pack.js && electron-builder --dir",
"dev": "node build-config/runner-dev.js",
Expand Down Expand Up @@ -37,15 +56,7 @@
"win": {
"icon": "src/static/icons/lunch.ico",
"legalTrademarks": "lyswhut",
"target": [
{
"arch": [
"ia32",
"x64"
],
"target": "nsis"
}
]
"artifactName": "${productName} v${version} ${env.ARCH} ${env.TARGET}.${ext}"
},
"linux": {
"target": [
Expand Down Expand Up @@ -76,7 +87,8 @@
"language": "2052",
"allowToChangeInstallationDirectory": true,
"differentialPackage": true,
"license": "./license.rtf"
"license": "./license.rtf",
"shortcutName": "lx-music"
},
"publish": [
{
Expand All @@ -90,8 +102,15 @@
"type": "git",
"url": "git+https://github.com/lyswhut/lx-music-desktop.git"
},
"keywords": [],
"author": "lyswhut",
"keywords": [
"music-player",
"electron-app",
"vuejs2"
],
"author": {
"name": "lyswhut",
"email": "lyswuhut@qq.com"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/lyswhut/lx-music-desktop/issues"
Expand Down
6 changes: 6 additions & 0 deletions publish/changeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
### 新增

- 新增任务栏程序标题改变功能(播放歌曲时任务栏标题将显示当前播放的歌曲)

### 修复

- 使用临时接口时,试听列表中的下载按钮仍然能点击的Bug
- 修复某些情况下歌曲链接未能缓存的问题

### 移除

- 移除临时接口(因服务器被攻击,本接口已关闭)
- 移除列表栏设置的隐藏专辑栏选项(感觉这个设置并没有什么luan用,并且还会打破布局)
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.2.2",
"desc": "<h3>修复</h3>\n<ul>\n<li>修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug</li>\n<li>修复播放到一半URL过期时不会刷新URL直接播放下一首的问题</li>\n</ul>\n",
"version": "0.2.3",
"desc": "<h3>新增</h3>\n<ul>\n<li>新增任务栏程序标题改变功能(播放歌曲时任务栏标题将显示当前播放的歌曲)</li>\n</ul>\n<h3>修复</h3>\n<ul>\n<li>使用临时接口时,试听列表中的下载按钮仍然能点击的Bug</li>\n<li>修复某些情况下歌曲链接未能缓存的问题</li>\n</ul>\n<h3>移除</h3>\n<ul>\n<li>移除临时接口(因服务器被攻击,本接口已关闭)</li>\n<li>移除列表栏设置的隐藏专辑栏选项(感觉这个设置并没有什么luan用,并且还会打破布局)</li>\n</ul>\n",
"history": [
{
"version": "0.2.2",
"desc": "<h3>修复</h3>\n<ul>\n<li>修复下载过程中出错重试5次都失败后不会自动开始下一个任务的Bug</li>\n<li>修复播放到一半URL过期时不会刷新URL直接播放下一首的问题</li>\n</ul>\n"
},
{
"version": "0.2.1",
"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"
Expand Down
2 changes: 1 addition & 1 deletion src/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ html(lang="cn")
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1.0")
meta(http-equiv="X-UA-Compatible" content="ie=edge")
title= require('../package.json').name
title 洛雪音乐助手

body
#root
Expand Down
3 changes: 3 additions & 0 deletions src/main/utils/autoUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { autoUpdater } = require('electron-updater')
const { mainOn } = require('../../common/icp')

autoUpdater.logger = log
// autoUpdater.autoDownload = false
autoUpdater.logger.transports.file.level = 'info'
log.info('App starting...')

Expand Down Expand Up @@ -62,12 +63,14 @@ module.exports = win => {
})
autoUpdater.on('update-available', (ev, info) => {
sendStatusToWindow('Update available.')
// win.webContents.send('update-available')
})
autoUpdater.on('update-not-available', (ev, info) => {
sendStatusToWindow('Update not available.')
})
autoUpdater.on('error', (ev, err) => {
sendStatusToWindow('Error in auto-updater.')
// win.webContents.send('update-error')
})
autoUpdater.on('download-progress', (ev, progressObj) => {
sendStatusToWindow('Download progress...')
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
this.getVersionInfo().then(body => {
this.setNewVersion(body)
this.$nextTick(() => {
this.setVersionVisible(true)
this.setVersionVisible({ isShow: true })
})
})
})
Expand Down
16 changes: 7 additions & 9 deletions src/renderer/components/core/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ div(:class="$style.player")
<script>
import Lyric from 'lrc-file-parser'
import { rendererSend } from '../../../common/icp'
import { formatPlayTime2, getRandom, checkPath } from '../../utils'
import { formatPlayTime2, getRandom, checkPath, setTitle } from '../../utils'
import { mapGetters, mapActions, mapMutations } from 'vuex'
import { requestMsg } from '../../utils/message'
Expand Down Expand Up @@ -334,14 +334,14 @@ export default {
startPlay() {
this.isPlay = true
if (this.musicInfo.lrc) this.lyric.lrc.play(this.audio.currentTime * 1000)
this.setAppName()
this.setAppTitle()
this.sendProgressEvent(this.progress, 'normal')
},
stopPlay() {
this.isPlay = false
this.lyric.lrc.pause()
this.sendProgressEvent(this.progress, 'paused')
this.clearAppName()
this.clearAppTitle()
},
setProgess(e) {
this.audio.currentTime =
Expand Down Expand Up @@ -432,13 +432,11 @@ export default {
mode: mode || 'normal',
})
},
setAppName() {
// rendererSend('appName', {
// name: `${this.musicInfo.name} - ${this.musicInfo.singer}`,
// })
setAppTitle() {
setTitle(`${this.musicInfo.name} - ${this.musicInfo.singer}`)
},
clearAppName() {
// rendererSend('appName')
clearAppTitle() {
setTitle()
},
},
}
Expand Down
11 changes: 10 additions & 1 deletion src/renderer/components/material/Checkbox.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template lang="pug">
div(:class="$style.checkbox")
input(:type="need ? 'radio' : 'checkbox'" :id="id" :value="value" :name="name" @change="change" v-model="bool")
input(:type="need ? 'radio' : 'checkbox'" :id="id" :disabled="disabled" :value="value" :name="name" @change="change" v-model="bool")
label(:for="id" :class="$style.content")
div(v-if="indeterminate")
svg(v-show="indeterminate" version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink' height='100%' width="100%" viewBox='0 32 448 448' space='preserve')
Expand Down Expand Up @@ -34,6 +34,10 @@ export default {
default: false,
},
label: {},
disabled: {
type: Boolean,
default: false,
},
indeterminate: {
type: Boolean,
default: false,
Expand Down Expand Up @@ -111,6 +115,11 @@ export default {
> input {
display: none;
&[disabled] {
+ .content {
opacity: .5;
}
}
&:checked {
+ .content {
> div {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { author, name } from '../../../package.json'
export default {
getVersionInfo() {
return new Promise((resolve, reject) => {
httpGet(`https://raw.githubusercontent.com/${author}/${name}/master/publish/version.json`, (err, resp, body) => {
httpGet(`https://raw.githubusercontent.com/${author.name}/${name}/master/publish/version.json`, (err, resp, body) => {
if (err) return reject(err)
resolve(body)
})
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 @@ -56,7 +56,7 @@ const actions = {
// mitations
const mutations = {
setUrl(state, datas) {
datas.musicInfo.typeUrl[datas.type] = datas.url
datas.musicInfo.typeUrl = Object.assign({}, datas.musicInfo.typeUrl, { [datas.type]: datas.url })
},
getPic(state, datas) {
datas.musicInfo.img = datas.url
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/store/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
// val.desc = val.desc.replace(/\n/g, '<br>')
state.version.newVersion = val
},
setVersionVisible(state, val) {
state.version.showModal = val
setVersionVisible(state, { isShow }) {
state.version.showModal = isShow
},
}
1 change: 1 addition & 0 deletions src/renderer/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default {
version,
newVersion: null,
showModal: false,
isError: false,
},
userInfo: null,
setting,
Expand Down
7 changes: 7 additions & 0 deletions src/renderer/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,10 @@ export const openUrl = url => {
shell.openExternal(url)
}

/**
* 设置标题
*/
let dom_title = document.getElementsByTagName('title')[0]
export const setTitle = title => {
dom_title.innerText = title || '洛雪音乐助手'
}
Loading

0 comments on commit 2b3aab2

Please sign in to comment.