Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream: v0.4.7 → v0.4.8 #6

Merged
merged 95 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
107bf53
fix: 错误的选择了音源质量 (#1589)
memorydream May 1, 2022
fab099c
feat: add img tag with loading attribute for lazy loading
hawtim May 1, 2022
4613fef
fix: render weekData error
hawtim May 2, 2022
35edd84
fix: vibrant worker error
hawtim May 2, 2022
8cd8ae4
Merge pull request #1597 from hawtim/feature/support-image-lazy-loading
hawtim May 2, 2022
97ac411
Merge pull request #1600 from hawtim/fix-node-vibrant-worker
hawtim May 2, 2022
9e787ba
Merge pull request #1598 from hawtim/fix-history-list-error
hawtim May 2, 2022
f064859
docs: add powered by vercel
qier222 May 10, 2022
c3aea5e
fix: bug
qier222 May 10, 2022
6e1d589
fix: 专辑分碟排序错误 (#1630)
memorydream May 11, 2022
f355d5d
fix(dockerfile): 限制最大標頭大小
pan93412 May 14, 2022
cb59eb9
docs: update vercel links
qier222 May 19, 2022
c1efcb8
fix: 歌词页视觉效果缺陷 (#1649)
memorydream May 20, 2022
bbbd729
fix: 部分linux发行版环境的托盘行为 (#1647)
memorydream May 20, 2022
439f368
fix: 音乐库收藏的歌单少了第一张歌单 (#1657)
memorydream May 22, 2022
fbc1e99
chore(ci/cd): bump `actions/checkout` to v3
Jun 1, 2022
b9cdade
chore(ci/cd): bump `actions/upload-artifact` to v3
Jun 1, 2022
6b690ba
fix: 修复在长时间暂停后无法播放的问题 (#1627)
memorydream Jun 19, 2022
1496a8a
fix: 歌名翻译文本位置 & FMCard背景颜色 (#1650)
memorydream Jun 19, 2022
2a2ac5a
fix: 私人推荐歌单 (#1665)
memorydream Jun 19, 2022
0abd616
feat: Add context menu on MV page (#1670)
xiaogaozi Jun 19, 2022
000cfda
feat: Added "Add to Playlist" on lyrics page (#1671)
8790 Jun 19, 2022
a31d552
fix(dockerfile): 设置 NCMAPI 版本 (#1689)
Viyerelu23333 Jun 19, 2022
7b911c1
feat: Add "Volume Control" to Lyrics Page (#1672)
8790 Jun 21, 2022
9e64222
feat: Add time to lyric page (#1676)
8790 Jun 21, 2022
6d3508c
fix: change port to workaround 21H2's port (#1706)
pan93412 Jun 22, 2022
43c5bda
chore(deps): upgrade dependencies (#1708)
pan93412 Jun 22, 2022
f9e6164
fix(ipcMain): unexpected “本草綱目“ from migu
pan93412 Jun 28, 2022
b589f82
feat: add tutorial to deploy on Replit (#1731)
jbwfu Aug 31, 2022
9fcb6da
feat: Add status text to like button when hover event triggers (#1789)
kayw-geek Sep 9, 2022
ce778af
feat: Tray icon theme now follows system theme
Revincx Oct 5, 2022
022f740
feat: osdlyrics desktop lyrics support
Revincx Oct 5, 2022
345f358
chore: improve translations
Revincx Oct 22, 2022
41b7256
refactor: improve lyric file download implement
Revincx Oct 22, 2022
70d2713
refactor(dockerfile): use `awk` to find NCMAPI version
karbobc Nov 19, 2022
99371de
refactor(dockerfile): separate nginx config from `Dockerfile`
karbobc Nov 19, 2022
75d3e28
feat: mount local time and time zone
karbobc Nov 19, 2022
c6804de
fix: 更新api以尝试解决邮箱登录问题
GrassBlock1 Dec 22, 2022
241de70
fix: 更新依赖以解决手机号登录问题;UnblockNeteaseMusic 更新 (#1915)
GrassBlock1 Jan 24, 2023
210e65d
update copyright year (#1917)
Nep-Timeline Jan 26, 2023
622f954
fix: player volume bug (#1918)
Nep-Timeline Jan 28, 2023
2f452db
fix: bugs
qier222 Jan 28, 2023
2a0af8f
fix: update version
qier222 Jan 28, 2023
ce738f6
revert: change port to workaround 21H2's port
qier222 Jan 30, 2023
c89ebbd
fix: album.company显示问题 (#2009)
Younglina Mar 22, 2023
1cb3e4b
Update README.md
qier222 Mar 26, 2023
7b97ac0
chore: define node engines (#1943)
moonrailgun Apr 8, 2023
8a50337
fix(tracklist): TrackListItem 序号问题 (#2011)
Younglina Apr 8, 2023
65f5df8
fix(request): cross domain api issue (#2026)
HolgerHuo Apr 8, 2023
b7f7ac8
fix(player): 修复歌曲时长过长时的进度显示问题 (#1936)
aldlss Apr 8, 2023
221ca63
fix(player): Skip track when audio source not supported (#2033)
Revincx Apr 15, 2023
1b7e33c
fix: 艺人页面专辑区不显示精选集 (#2046)
krishukr May 1, 2023
59898c7
fix(navbar): Fixed the issue of overlapping with the control bar (#2073)
zhuozhiyongde Jun 18, 2023
a6e433b
chore(deps): Add prettier to devDependencies (#2071)
guaqiu5 Jun 18, 2023
dd6d4bf
feat(settings): Internationalize some strings (#2016)
Anmizi Jul 3, 2023
4ec550d
fix(login): clear last interval when calling checkQrCodeLogin (#2094)
Siykt Jul 24, 2023
e14e6d7
ci: Use Ubuntu 22.04 for Packaging (#2107)
mokurin000 Aug 7, 2023
f4d3d67
feat(mpris): Add `xesam:url` field (#2095)
mokurin000 Aug 7, 2023
f2efc4e
feat(lyrics): Add pronunciation lyric mode (#2091)
HomeArchbishop Aug 7, 2023
845bc8a
Merge branch 'qier222:master' into revincx-pr
Revincx Aug 25, 2023
f2f4e2c
fix(player): 插队曲目切换后下一首曲目丢失 (#2118)
runnableAir Aug 26, 2023
ed1daab
feat: use osdlyrics dbus interface to send lyric contents
Revincx Aug 26, 2023
6ad756b
fix(ui): add max-width attr for settings selector
Revincx Aug 26, 2023
486b04b
feat(player): sync playing progress to mpris service on linux
Revincx Aug 26, 2023
fd40a29
Merge pull request #1818 from Revincx/revincx-pr
pan93412 Aug 26, 2023
a5bf5c7
fix(Player.js): 右键播放不显示播放器(#1965)
runnableAir Aug 18, 2023
61d0b59
refactor(Player.js): 确保在播放时播放器处于enabled状态
runnableAir Aug 18, 2023
c5c7ccc
fix: play icon not appear in Safari
jsonleex Sep 4, 2023
e997cd9
Support unblock via docker.
colawithsauce Dec 8, 2023
a5cb1f7
Remove unneeded env setting
colawithsauce Dec 8, 2023
dc1e0aa
Make docker works
colawithsauce Dec 8, 2023
6d6fd9a
Make docker works
colawithsauce Dec 8, 2023
42366f4
remove unneeded empty line.
colawithsauce Dec 8, 2023
3093b6f
修正专辑下描述内艺人链接
krishukr Jan 31, 2024
9241b3a
same thing on MvRow
krishukr Jan 31, 2024
380c55a
Create sync.yml
thedavidweng Feb 6, 2024
e738d1e
Merge pull request #2176 from krishukr/master
pan93412 Mar 1, 2024
c409e3b
Merge pull request #2167 from colawithsauce/master
pan93412 Mar 1, 2024
6e737b5
Merge branch 'master' of https:/qier222/YesPlayMusic
actions-user Mar 1, 2024
1400636
Merge pull request #2129 from jsonleex/patch
pan93412 Mar 1, 2024
741fdc9
Merge pull request #2127 from runnableAir/fix_player_enable
pan93412 Mar 1, 2024
1a2c3e2
Merge pull request #2178 from thedavidweng/master
pan93412 Mar 1, 2024
79a7c6d
fix typo
undefined-ux Mar 2, 2024
a18e093
fix: fix build && adapte for bugs in NeteasyCloudMusicAPI
DaiQiangReal Mar 4, 2024
b0ed856
chore: remove useless space
DaiQiangReal Mar 4, 2024
552a1d4
chore: remove useless space
DaiQiangReal Mar 4, 2024
ae352f2
Merge pull request #2187 from DaiQiangReal/master
pan93412 Mar 4, 2024
e3caa24
Merge pull request #2185 from undefined-ux/master
pan93412 Mar 4, 2024
dd8aa17
chore: bump to 0.4.8
pan93412 Mar 4, 2024
84613dc
Update build.yaml
rainbowflesh Mar 5, 2024
da8afc1
Update request.js
rainbowflesh Mar 5, 2024
87ef48b
Merge pull request #2193 from rainbowflesh/master
pan93412 Mar 5, 2024
f9cbe88
Merge tag 'v0.4.8-2' into gcj/merge-upstream
xiaogaozi Mar 29, 2024
09a8886
Fix build
xiaogaozi Mar 29, 2024
edd648e
Revert "修正专辑下描述内艺人链接"
xiaogaozi Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04]
os: [macos-latest, windows-latest, ubuntu-22.04]

steps:
- name: Check out Git repository
Expand All @@ -36,7 +36,7 @@ jobs:
run: |
sudo apt-get update &&
sudo apt-get install --no-install-recommends -y rpm &&
sudo apt-get install --no-install-recommends -y bsdtar &&
sudo apt-get install --no-install-recommends -y libarchive-tools &&
sudo apt-get install --no-install-recommends -y libopenjp2-tools

- name: Install Snapcraft (on Ubuntu)
Expand Down Expand Up @@ -81,6 +81,7 @@ jobs:
- name: Build/release Electron app
uses: samuelmeuli/[email protected]
env:
VUE_APP_NETEASE_API_URL: /api
VUE_APP_ELECTRON_API_URL: /api
VUE_APP_ELECTRON_API_URL_DEV: http://127.0.0.1:10754
VUE_APP_LASTFM_API_KEY: 09c55292403d961aa517ff7f5e8a3d9c
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Upstream Sync

permissions:
contents: write
issues: write
actions: write

on:
schedule:
- cron: '0 * * * *' # every hour
workflow_dispatch:

jobs:
sync_latest_from_upstream:
name: Sync latest commits from upstream repo
runs-on: ubuntu-latest
if: ${{ github.event.repository.fork }}

steps:
- uses: actions/checkout@v4

- name: Clean issue notice
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
labels: '🚨 Sync Fail'

- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
upstream_sync_repo: qier222/YesPlayMusic
upstream_sync_branch: master
target_sync_branch: master
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
test_mode: false

- name: Sync check
if: failure()
uses: actions-cool/issues-helper@v3
with:
actions: 'create-issue'
title: '🚨 同步失败 | Sync Fail'
labels: '🚨 Sync Fail'
body: |
Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork.

由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次。
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
FROM node:16.13.1-alpine as build
ENV VUE_APP_NETEASE_API_URL=/api
WORKDIR /app
RUN apk add --no-cache python3 make g++ git
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\
apk add --no-cache python3 make g++ git
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build
RUN yarn config set electron_mirror https://npmmirror.com/mirrors/electron/ && \
yarn build

FROM nginx:1.20.2-alpine as app

COPY --from=build /app/package.json /usr/local/lib/

RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories &&\
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main libuv \
&& apk add --no-cache --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.14/main nodejs npm \
&& npm i -g $(awk -F \" '{if($2=="NeteaseCloudMusicApi") print $2"@"$4}' /usr/local/lib/package.json) \
&& rm -f /usr/local/lib/package.json

COPY --from=build /app/docker/nginx.conf.example /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html

CMD nginx ; exec npx NeteaseCloudMusicApi
CMD nginx ; exec npx NeteaseCloudMusicApi
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

[![Library][library-screenshot]](https://music.qier222.com)


## 全新版本
全新2.0 Alpha测试版已发布,欢迎前往 [Releases](https:/qier222/YesPlayMusic/releases) 页面下载。
当前版本将会进入维护模式,除重大bug修复外,不会再更新新功能。

## ✨ 特性

- ✅ 使用 Vue.js 全家桶开发
Expand Down Expand Up @@ -157,7 +162,7 @@ bash <(curl -s -L https://raw.githubusercontent.com/qier222/YesPlayMusic/main/in
4. 由于 replit 个人版限制内存为 1G(教育版为 3G),构建过程中可能会失败,请再次运行上述命令或运行以下命令:

```sh
cd /home/runner/${REPL_SLUG}/music && yarn installl && yarn run build
cd /home/runner/${REPL_SLUG}/music && yarn install && yarn run build
```

## 👷‍♂️ 打包客户端
Expand Down
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ services:
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./docker/nginx.conf.example:/etc/nginx/conf.d/default.conf:ro
ports:
- 80:80
restart: always
depends_on:
- UnblockNeteaseMusic
environment:
- NODE_TLS_REJECT_UNAUTHORIZED=0
networks:
my_network:

UnblockNeteaseMusic:
image: pan93412/unblock-netease-music-enhanced
command: -o kugou kuwo migu bilibili pyncmd -p 80:443 -f 45.127.129.53 -e -
# environment:
# JSON_LOG: true
# LOG_LEVEL: debug
networks:
my_network:
aliases:
- music.163.com
- interface.music.163.com
- interface3.music.163.com
- interface.music.163.com.163jiasu.com
- interface3.music.163.com.163jiasu.com
restart: always

networks:
my_network:
driver: bridge
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yesplaymusic",
"version": "0.4.7",
"version": "0.4.8",
"private": true,
"description": "A third party music player for Netease Music",
"author": "qier222<[email protected]>",
Expand Down Expand Up @@ -44,6 +44,8 @@
"electron-log": "^4.3.0",
"electron-store": "^8.0.1",
"electron-updater": "^5.0.1",
"esbuild": "^0.20.1",
"esbuild-loader": "^4.0.3",
"express": "^4.17.1",
"express-fileupload": "^1.2.0",
"express-http-proxy": "^1.6.2",
Expand All @@ -60,7 +62,6 @@
"pac-proxy-agent": "^4.1.0",
"pangu": "^4.0.7",
"plyr": "^3.6.2",
"prettier": "2.5.1",
"qrcode": "^1.4.4",
"register-service-worker": "^1.7.1",
"svg-sprite-loader": "^6.0.11",
Expand Down Expand Up @@ -89,6 +90,7 @@
"eslint-plugin-vue": "^7.9.0",
"husky": "^4.3.0",
"node-polyfill-webpack-plugin": "^2.0.1",
"prettier": "2.5.1",
"sass": "^1.26.11",
"sass-loader": "^10.0.2",
"vue-cli-plugin-electron-builder": "~3.0.0-alpha.4",
Expand Down
Binary file added public/img/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import { EventEmitter } from 'events';
import express from 'express';
import expressProxy from 'express-http-proxy';
import Store from 'electron-store';
import { createMpris } from '@/electron/mpris';
import { createMpris, createDbus } from '@/electron/mpris';
import { spawn } from 'child_process';
const clc = require('cli-color');
const log = text => {
console.log(`${clc.blueBright('[background.js]')} ${text}`);
Expand Down Expand Up @@ -420,6 +421,21 @@ class Background {
registerGlobalShortcut(this.window, this.store);
}

// try to start osdlyrics process on start
if (this.store.get('settings.enableOsdlyricsSupport')) {
await createDbus(this.window);
log('try to start osdlyrics process');
const osdlyricsProcess = spawn('osdlyrics');

osdlyricsProcess.on('error', err => {
log(`failed to start osdlyrics: ${err.message}`);
});

osdlyricsProcess.on('exit', (code, signal) => {
log(`osdlyrics process exited with code ${code}, signal ${signal}`);
});
}

// create mpris
if (isCreateMpris) {
createMpris(this.window);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Cover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ img {
cursor: default;
transition: 0.2s;
.svg-icon {
height: 44%;
width: 50%;
margin: {
left: 4px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MvRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {
artistName = mv.creator[0].userName;
artistID = mv.creator[0].userId;
}
return `<a href="/#/artist/${artistID}">${artistName}</a>`;
return `<a href="/artist/${artistID}">${artistName}</a>`;
} else if (this.subtitle === 'publishTime') {
return mv.publishTime;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ nav {

@media (max-width: 1336px) {
nav {
padding: 0 5vw;
padding: 0 max(5vw, 90px);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/components/TrackList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
v-for="(track, index) in tracks"
:key="itemKey === 'id' ? track.id : `${track.id}${index}`"
:track-prop="track"
:track-no="index + 1"
:highlight-playing-track="highlightPlayingTrack"
@dblclick.native="
playThisList(track.mainTrackId || track.id || track.songId)
Expand Down
3 changes: 2 additions & 1 deletion src/components/TrackListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
style="height: 14px; width: 14px"
></svg-icon>
</button>
<span v-show="(!focus || !playable) && !isPlaying">{{ track.no }}</span>
<span v-show="(!focus || !playable) && !isPlaying">{{ trackNo }}</span>
<button v-show="isPlaying">
<svg-icon
icon-class="volume"
Expand Down Expand Up @@ -108,6 +108,7 @@ export default {

props: {
trackProp: Object,
trackNo: Number,
highlightPlayingTrack: {
type: Boolean,
default: true,
Expand Down
32 changes: 32 additions & 0 deletions src/electron/mpris.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import dbus from 'dbus-next';
import { ipcMain, app } from 'electron';

export function createMpris(window) {
Expand Down Expand Up @@ -28,18 +29,26 @@ export function createMpris(window) {
});

ipcMain.on('metadata', (e, metadata) => {
// 更新 Mpris 状态前将位置设为0, 否则 OSDLyrics 获取到的进度是上首音乐切换时的进度
player.getPosition = () => 0;
player.metadata = {
'mpris:trackid': player.objectPath('track/' + metadata.trackId),
'mpris:artUrl': metadata.artwork[0].src,
'mpris:length': metadata.length * 1000 * 1000,
'xesam:title': metadata.title,
'xesam:album': metadata.album,
'xesam:artist': metadata.artist.split(','),
'xesam:url': metadata.url,
};
});

ipcMain.on('playerCurrentTrackTime', (e, position) => {
player.getPosition = () => position * 1000 * 1000;
player.seeked(position * 1000 * 1000);
});

ipcMain.on('seeked', (e, position) => {
player.seeked(position * 1000 * 1000);
});

ipcMain.on('switchRepeatMode', (e, mode) => {
Expand All @@ -60,3 +69,26 @@ export function createMpris(window) {
player.shuffle = shuffle;
});
}

export async function createDbus(window) {
const bus = dbus.sessionBus();
const Variant = dbus.Variant;

const osdService = await bus.getProxyObject(
'org.osdlyrics.Daemon',
'/org/osdlyrics/Lyrics'
);

const osdInterface = osdService.getInterface('org.osdlyrics.Lyrics');

ipcMain.on('sendLyrics', async (e, { track, lyrics }) => {
const metadata = {
title: new Variant('s', track.name),
artist: new Variant('s', track.ar.map(ar => ar.name).join(', ')),
};

await osdInterface.SetLyricContent(metadata, Buffer.from(lyrics));

window.webContents.send('saveLyricFinished');
});
}
1 change: 1 addition & 0 deletions src/electron/services.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import clc from 'cli-color';
import checkAuthToken from '../utils/checkAuthToken';
import server from 'NeteaseCloudMusicApi/server';

export async function startNeteaseMusicApi() {
Expand Down
7 changes: 5 additions & 2 deletions src/electron/tray.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global __static */
import path from 'path';
import { app, nativeImage, Tray, Menu } from 'electron';
import { app, nativeImage, Tray, Menu, nativeTheme } from 'electron';
import { isLinux } from '@/utils/platform';

function createMenuTemplate(win) {
Expand Down Expand Up @@ -197,8 +197,11 @@ class YPMTrayWindowsImpl {
}

export function createTray(win, eventEmitter) {
// 感觉图标颜色应该不属于界面主题范畴,只需要跟随系统主题
let iconTheme = nativeTheme.shouldUseDarkColors ? 'light' : 'dark';

let icon = nativeImage
.createFromPath(path.join(__static, 'img/icons/[email protected]'))
.createFromPath(path.join(__static, `img/icons/menu-${iconTheme}@88.png`))
.resize({
height: 20,
width: 20,
Expand Down
Loading