mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 19:37:35 +08:00
🐞 fix: UID 模式歌单歌曲获取数量过少
This commit is contained in:
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -36,7 +36,6 @@ jobs:
|
|||||||
# 构建 Electron App
|
# 构建 Electron App
|
||||||
- name: Build Electron App for Windows
|
- name: Build Electron App for Windows
|
||||||
run: npm run build:win || true
|
run: npm run build:win || true
|
||||||
shell: bash
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
# 上传构建产物
|
# 上传构建产物
|
||||||
@@ -51,7 +50,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: false
|
||||||
files: dist/*.*
|
files: dist/*.*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
@@ -98,7 +97,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: false
|
||||||
files: dist/*.*
|
files: dist/*.*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
@@ -119,6 +118,12 @@ jobs:
|
|||||||
# 更新 Ubuntu 软件源
|
# 更新 Ubuntu 软件源
|
||||||
- name: Ubuntu Update with sudo
|
- name: Ubuntu Update with sudo
|
||||||
run: sudo apt-get update
|
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
|
- name: Copy .env.example
|
||||||
run: |
|
run: |
|
||||||
@@ -148,7 +153,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: false
|
||||||
files: dist/*.*
|
files: dist/*.*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ import { debounce, isObject } from "lodash-es";
|
|||||||
import { useDataStore, useStatusStore } from "@/stores";
|
import { useDataStore, useStatusStore } from "@/stores";
|
||||||
import { openBatchList, openUpdatePlaylist } from "@/utils/modal";
|
import { openBatchList, openUpdatePlaylist } from "@/utils/modal";
|
||||||
import { formatTimestamp } from "@/utils/time";
|
import { formatTimestamp } from "@/utils/time";
|
||||||
|
import { isLogin } from "@/utils/auth";
|
||||||
import player from "@/utils/player";
|
import player from "@/utils/player";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -297,7 +298,7 @@ const getPlaylistData = async (id: number, getList: boolean, refresh: boolean) =
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 如果已登录且歌曲数量少于 800,直接加载所有歌曲
|
// 如果已登录且歌曲数量少于 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 ids: number[] = detail.privileges.map((song: any) => song.id as number);
|
||||||
const result = await songDetail(ids);
|
const result = await songDetail(ids);
|
||||||
playlistData.value = formatSongsList(result.songs);
|
playlistData.value = formatSongsList(result.songs);
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ const handleOnlinePlaylist = async (id: number, getList: boolean, refresh: boole
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 如果已登录且歌曲数量少于 800,直接加载所有歌曲
|
// 如果已登录且歌曲数量少于 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 ids: number[] = detail.privileges.map((song: any) => song.id as number);
|
||||||
const result = await songDetail(ids);
|
const result = await songDetail(ids);
|
||||||
playlistData.value = formatSongsList(result.songs);
|
playlistData.value = formatSongsList(result.songs);
|
||||||
|
|||||||
Reference in New Issue
Block a user