小雅获取剧集时刷新文件夹

This commit is contained in:
mtvpls
2026-01-15 23:48:13 +08:00
parent e392e9f543
commit 036e909f74
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -6200,7 +6200,7 @@ function PlayPageClient() {
// 使用轮询机制等待弹幕插件准备好(替代固定延迟)
let pollAttempts = 0;
const maxPollAttempts = 60; // 最多尝试 60 次(30 秒)
const maxPollAttempts = 120; // 最多尝试 120 次(60 秒)
const pollInterval = 500; // 每 500ms 检查一次
const pollForDanmakuPlugin = () => {
+2 -2
View File
@@ -290,7 +290,7 @@ export async function getXiaoyaEpisodes(
if (isInSeasonDir) {
// 电视剧:列出当前季的所有集
const seasonDir = pathParts.slice(0, -1).join('/');
const listResponse = await xiaoyaClient.listDirectory(`/${seasonDir}`);
const listResponse = await xiaoyaClient.listDirectory(`/${seasonDir}`, 1, 100, true);
const videoFiles = listResponse.content
.filter(item =>
@@ -318,7 +318,7 @@ export async function getXiaoyaEpisodes(
} else {
// 目录路径或电影文件路径:列出该目录下的所有视频
const targetDir = isFilePath ? pathParts.slice(0, -1).join('/') : pathParts.join('/');
const listResponse = await xiaoyaClient.listDirectory(`/${targetDir}`);
const listResponse = await xiaoyaClient.listDirectory(`/${targetDir}`, 1, 100, true);
const videoFiles = listResponse.content
.filter(item =>
+2 -2
View File
@@ -106,7 +106,7 @@ export class XiaoyaClient {
/**
* 列出目录内容
*/
async listDirectory(path: string, page = 1, perPage = 100): Promise<XiaoyaListResponse> {
async listDirectory(path: string, page = 1, perPage = 100, refresh = false): Promise<XiaoyaListResponse> {
const token = await this.getToken();
const response = await fetch(`${this.baseURL}/api/fs/list`, {
@@ -119,7 +119,7 @@ export class XiaoyaClient {
path,
page,
per_page: perPage,
refresh: false,
refresh,
}),
});