🐞 fix: UID 模式歌单歌曲获取数量过少

This commit is contained in:
imsyy
2024-10-15 10:51:07 +08:00
parent 3a6f8e7462
commit a8f01d5728
3 changed files with 12 additions and 6 deletions

View File

@@ -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 }}
# 上传构建产物
@@ -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 }}
@@ -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 }}
@@ -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: |
@@ -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 }}

View File

@@ -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();
@@ -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);

View File

@@ -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);