Merge branch 'master' into deploy

# Conflicts:
#	src/views/settings.vue
This commit is contained in:
qier222 2022-05-20 00:08:25 +08:00
commit 3118376fd3
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D
4 changed files with 16 additions and 8 deletions

View File

@ -25,6 +25,9 @@ RUN echo $'server { \n\
} \n\ } \n\
\n\ \n\
location /api/ { \n\ location /api/ { \n\
proxy_buffer_size 128k; \n\
proxy_buffers 16 32k; \n\
proxy_busy_buffers_size 128k; \n\
proxy_set_header Host $host; \n\ proxy_set_header Host $host; \n\
proxy_set_header X-Real-IP $remote_addr; \n\ proxy_set_header X-Real-IP $remote_addr; \n\
proxy_set_header X-Forwarded-For $remote_addr; \n\ proxy_set_header X-Forwarded-For $remote_addr; \n\

View File

@ -57,7 +57,7 @@ Electron 版本由 [@hawtim](https://github.com/hawtim) 和 [@qier222](https://g
本项目的 Demo (https://music.qier222.com) 就是部署在 Vercel 上的网站。 本项目的 Demo (https://music.qier222.com) 就是部署在 Vercel 上的网站。
[![Powered by Vercel](https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg)](https://vercel.com/?utm_source=ypm&utm_campaign=oss) [![Powered by Vercel](https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg)](https://vercel.com/?utm_source=ohmusic&utm_campaign=oss)
1. 部署网易云 API详情参见 [Binaryify/NeteaseCloudMusicApi](https://neteasecloudmusicapi.vercel.app/#/?id=%e5%ae%89%e8%a3%85) 1. 部署网易云 API详情参见 [Binaryify/NeteaseCloudMusicApi](https://neteasecloudmusicapi.vercel.app/#/?id=%e5%ae%89%e8%a3%85)
。你也可以将 API 部署到 Vercel。 。你也可以将 API 部署到 Vercel。

View File

@ -71,12 +71,12 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="Object.keys(tracksByDisc).length !== 1"> <div v-if="tracksByDisc.length > 1">
<div v-for="(disc, cd) in tracksByDisc" :key="cd"> <div v-for="item in tracksByDisc" :key="item.disc">
<h2 class="disc">Disc {{ cd }}</h2> <h2 class="disc">Disc {{ item.disc }}</h2>
<TrackList <TrackList
:id="album.id" :id="album.id"
:tracks="disc" :tracks="item.tracks"
:type="'album'" :type="'album'"
:album-object="album" :album-object="album"
/> />
@ -153,7 +153,7 @@ import locale from '@/locale';
import { splitSoundtrackAlbumTitle, splitAlbumTitle } from '@/utils/common'; import { splitSoundtrackAlbumTitle, splitAlbumTitle } from '@/utils/common';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import { isAccountLoggedIn } from '@/utils/auth'; import { isAccountLoggedIn } from '@/utils/auth';
import { groupBy } from 'lodash'; import { groupBy, toPairs, sortBy } from 'lodash';
import ExplicitSymbol from '@/components/ExplicitSymbol.vue'; import ExplicitSymbol from '@/components/ExplicitSymbol.vue';
import ButtonTwoTone from '@/components/ButtonTwoTone.vue'; import ButtonTwoTone from '@/components/ButtonTwoTone.vue';
@ -222,7 +222,12 @@ export default {
} }
}, },
tracksByDisc() { tracksByDisc() {
return groupBy(this.tracks, 'cd'); if (this.tracks.length <= 1) return [];
const pairs = toPairs(groupBy(this.tracks, 'cd'));
return sortBy(pairs, p => p[0]).map(items => ({
disc: items[0],
tracks: items[1],
}));
}, },
}, },
created() { created() {

View File

@ -680,7 +680,7 @@
<a <a
v-if="!isElectron" v-if="!isElectron"
href="https://vercel.com/?utm_source=ypm&utm_campaign=oss" href="https://vercel.com/?utm_source=ohmusic&utm_campaign=oss"
> >
<img <img
height="36" height="36"