Skip to content

Commit

Permalink
🐞 fix: UID 模式歌单歌曲获取数量过少
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Oct 15, 2024
1 parent 3a6f8e7 commit a8f01d5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
# 构建 Electron App
- name: Build Electron App for Windows
run: npm run build:win || true
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# 上传构建产物
Expand All @@ -51,7 +50,7 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
draft: false
files: dist/*.*
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Expand Down Expand Up @@ -98,7 +97,7 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
draft: false
files: dist/*.*
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Expand All @@ -119,6 +118,12 @@ jobs:
# 更新 Ubuntu 软件源
- name: Ubuntu Update with sudo
run: sudo apt-get update
# 安装依赖
- name: Install RPM & Pacman
run: |
sudo apt-get install --no-install-recommends -y rpm &&
sudo apt-get install --no-install-recommends -y libarchive-tools &&
sudo apt-get install --no-install-recommends -y libopenjp2-tools
# 复制环境变量文件
- name: Copy .env.example
run: |
Expand Down Expand Up @@ -148,7 +153,7 @@ jobs:
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
draft: true
draft: false
files: dist/*.*
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
3 changes: 2 additions & 1 deletion src/views/List/liked.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ import { debounce, isObject } from "lodash-es";
import { useDataStore, useStatusStore } from "@/stores";
import { openBatchList, openUpdatePlaylist } from "@/utils/modal";
import { formatTimestamp } from "@/utils/time";
import { isLogin } from "@/utils/auth";
import player from "@/utils/player";

const router = useRouter();
Expand Down Expand Up @@ -297,7 +298,7 @@ const getPlaylistData = async (id: number, getList: boolean, refresh: boolean) =
return;
}
// 如果已登录且歌曲数量少于 800,直接加载所有歌曲
if ((playlistDetailData.value?.count as number) < 800) {
if (isLogin() === 1 && (playlistDetailData.value?.count as number) < 800) {
const ids: number[] = detail.privileges.map((song: any) => song.id as number);
const result = await songDetail(ids);
playlistData.value = formatSongsList(result.songs);
Expand Down
2 changes: 1 addition & 1 deletion src/views/List/playlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const handleOnlinePlaylist = async (id: number, getList: boolean, refresh: boole
return;
}
// 如果已登录且歌曲数量少于 800,直接加载所有歌曲
if (isLogin() && (playlistDetailData.value?.count as number) < 800) {
if (isLogin() === 1 && (playlistDetailData.value?.count as number) < 800) {
const ids: number[] = detail.privileges.map((song: any) => song.id as number);
const result = await songDetail(ids);
playlistData.value = formatSongsList(result.songs);
Expand Down

0 comments on commit a8f01d5

Please sign in to comment.